Doom monster
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > text-file-only script
 
Author
All times are GMT. The time now is 17:39. Post New Thread    Post A Reply
gggmork
Banned


Posts: 1790
Registered: 06-07


I'm trying to make text file code you can drag/drop into zdoom, like one of these files I guess:
http://cutstuff.net/blog/?page_id=1658

Those are '.wad' but you can open with notepad to see they're code-only that just gets added to the iwad or something.

I tried typing code in notepad, then saving as wad instead of txt, but drag/dropping that into zdoom didn't seem to do anything, even if I copy their code into my own text file then rename as wad. Maybe I have to compile it or something (but I don't currently have doombuilder), or am clueless in some other lame way.

Old Post 02-18-10 08:02 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 6458
Registered: 07-07


What's the file's name? A text file named DECORATE.WAD will be interpreted as a DECORATE lump; a text file named MAPINFO.WAD will be interpreted as a MAPINFO lump, and so on.

Old Post 02-18-10 08:36 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
gggmork
Banned


Posts: 1790
Registered: 06-07


I download XinvasionX.wad. I can drop this into zdoom and it works fine. (even though that's apparently not called 'decorate' or 'mapinfo' etc).

So as a test, I just copy all the text inside XinvasionX, and paste it into my own new text file (which I named decorate.wad this time). Now even though decorate.wad seems like it should be the same as XinvastionX (same text code pasted/saved in it), when I drag/drop decorate.wad into zdoom it says:

Execution could not continue.
Failed to allocate -1 bytes from process heap

Which is just computers giving me their usual bullshit because they hate me.
I also tried a test hello world. I typed this in a new txt file:

code:
#include "zcommon.acs" script 1 ENTER { print(s:"Hello World!"); }

then I renamed it decorate.wad. Dropping it in zdoom just said:
Execution could not continue.
Could not find script lump 'zcommon.acs'

But xInvasionX.wad has that same #include "zcommon.acs" line in it, and it works.


edit: (ignore that edit, still get the error if I paste into my own text file)

Last edited by gggmork on 02-18-10 at 09:49

Old Post 02-18-10 09:05 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Xtroose
Junior Member


Posts: 247
Registered: 12-09


code:
#include "zcommon.acs" script 1 ENTER { print(s:"Hello World!"); }


This is an ACS script. You have to compile it with ACC to make it usable.

It will work with any map, if you modify the script to be used as a library.

code:
#library "hello" // this defines the script as a library named hello #include "zcommon.acs" script 1 ENTER { print(s:"Hello World!"); }


Then you should copile it with ACC and name the compiled script lump HELLO. You must put this lump between A_START and A_END markers.

Then you could use the LOADACS lump. You call the library named hello like this:

code:
hello // The library name specified in the script.


Example wad: Download

Old Post 02-18-10 09:55 #
Xtroose is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
gggmork
Banned


Posts: 1790
Registered: 06-07


I think I get it now, thanks. I just assumed people that made the scripts in the link in the first post just wrote stuff in notepad and it just basically worked like that (but what do I know). So I guess they had to fiddle with xwe and stuff too to put their script in a wad instead of just renaming .txt to .wad lol.
I made the .o file correctly I think, and that wad you made said 'hello world' correctly. I guess I'll hassle with xwe tomorrow since I guess that's a necessary step to put it between the A_START and A_END markers.

Old Post 02-18-10 10:34 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 6458
Registered: 07-07



gggmork said:
I think I get it now, thanks. I just assumed people that made the scripts in the link in the first post just wrote stuff in notepad and it just basically worked like that (but what do I know).

It works for everything but ACS. DECORATE, TEXTURES, ANIMDEFS, MAPINFO, TERRAIN... All these lumps and more are text lumps.

Old Post 02-18-10 10:49 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
gggmork
Banned


Posts: 1790
Registered: 06-07


My guess is acs is better than decorate/etc as far as having control/power to do whatever you want? Interesting that decorate can just be a txt file renamed to wad.

Old Post 02-18-10 11:15 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 6458
Registered: 07-07


They do different things, really. Depends what you want to do. Altering how a level behaves? ACS. Altering how an object, independently of levels, behave? DECORATE. There aren't that many domains in which you could use either to achieve the same result.

Old Post 02-18-10 11:32 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
gggmork
Banned


Posts: 1790
Registered: 06-07


I've been trying simple decorate experiments, like making the player smaller, which I did like this using notepad in case anyone's interested (using the zdoom wiki to figure out how):

make a text file called decorate.wad with code like this:

code:
ACTOR DoomPlayer2 : doomplayer replaces doomplayer { height 8 player.viewheight 8 player.damagescreencolor "purple" player.forwardmove .2 player.sidemove .2 }


make a 2nd text file called keyconf.wad with this code:

code:
clearplayerclasses addplayerclass doomplayer2


Then drag/drop both of those text 'wads' into zdoom simultaneously.

The player still bobs up and down as if he was normal size though and according to this 2008 thread:
http://forum.zdoom.org/viewtopic.ph...=17716&start=15
I guess you can't control movebob or whatever with decorate to reduce the bobbing, but can only edit your own zdoom cfg console variable.

I made a a purple low mass cyberdemon (title it decorate.wad too; you don't need any keyconf.wad for this one, then just idclev to a level w/ a cyberdemon):
code:
actor Cyberdemon2 : cyberdemon replaces cyberdemon { spawnid 114 renderstyle "stencil" stencilcolor "purple" mass 10 }


I wonder if decorate could do something like make the player gradually grow or shrink over time instead of being one static size, or make the cyber demon only get 'stencil' rendered when it gets hit (normal rendered the rest of the time) and have the color gradually change from light purple to dark purple based on how much life it has left (maybe not a great idea but more an experiment to learn how to control stuff). I kinda doubt decorate can do more intricate things like that but acs might.

Old Post 02-19-10 11:08 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 6458
Registered: 07-07



gggmork said:
I wonder if decorate could do something like make the player gradually grow or shrink over time instead of being one static size

No, collision property (height and radius) cannot be changed dynamically (except through morphing). The developers never wanted to deal with the issues arising with actors suddenly becoming too big to stand in their sector.

Old Post 02-19-10 13:16 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 17:39. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > text-file-only script

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory