Editing all.spawn

From Mod Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:08, 10 July 2008 (edit)
Atrocious (Talk | contribs)
(Troubleshooting - source http://forums.filefront.com/4326719-post165.html)
← Previous diff
Revision as of 23:35, 10 July 2008 (edit) (undo)
Atrocious (Talk | contribs)
(Troubleshooting - moar info)
Next diff →
Line 26: Line 26:
If the decompiling breaks, it is most probably because your acdc.pl does not work with the all.spawn you use. Use the correct version for your STALKER patch version and use a suitable version if you try to decompile mods. If you can't get the correct version for the mod or version, you have to create it by yourself: If the decompiling breaks, it is most probably because your acdc.pl does not work with the all.spawn you use. Use the correct version for your STALKER patch version and use a suitable version if you try to decompile mods. If you can't get the correct version for the mod or version, you have to create it by yourself:
 +*Open a dos box (<tt>cmd.exe</tt>) and make your way through the directories into the recently created all.spawn workspace
 +*Once you are there, type ''decompile'' and hit enter
 +*It will again attempt to decompile but it will fail. Now you should have an error message like:
 +<source lang="ini">
 +unknown amk_zone_mincer_average at acdc.pl line 2256.
 +</source>
 +Your <tt>acdc.pl</tt> doesn't know ''amk_zone_mincer_average''. Time to change that:
*Right-click on <tt>acdc.pl</tt> and chose ''edit''. *Right-click on <tt>acdc.pl</tt> and chose ''edit''.
*Scroll down until you find lines like these: *Scroll down until you find lines like these:
Line 37: Line 44:
m_osoznanie => 'se_stalker', </source> m_osoznanie => 'se_stalker', </source>
-They are under '''section_to_class'''. Now you can add new items that have been added to the all.spawn in the same manner. Just make sure to point the new items to the right classes. The above example is for Stalker, but there are also examples for monsters and different items. +They are under '''section_to_class'''. Now you can add new items that have been added to the all.spawn in the same manner. Just make sure to point the new items to the right classes. The above example is for Stalker, but there are also examples for monsters and different items. The section from the error message is an anomaly from AMK, so we would have to add it as anomaly:
 +<source lang="ini">
 +amk_zone_mincer_average => 'se_zone_anom',</source>
 +Then save and close <tt>acdc.pl</tt> and try to decompile again. If it fails again (almost certain), check for the next unknown item and add it like the first.
 + 
 +'''Important:''' Before you even start working on a spawn file from another mod, ask the creators of the mod if you are allowed to alter their work. At least do it if you plan to release your changes as new mod. That should go without saying!
 + 
 + 
[[category:articles]] [[category:articles]]

Revision as of 23:35, 10 July 2008

all.spawn is a rather big file in the S.T.A.L.K.E.R. gamedata\spawns directory. It contains information about NPCs, monsters, objects, basically anything that is not static level geometry in STALKER. The files is loaded once at game start and it's information is stored in the save-game. That means: Editing the all.spawn requires to start a new game afterwards!

Contents


Setting up all.spawn workspace

Before you can start, you need to download a little tool that opens the all.spawn for you. The link is on the Tools list. Follow these steps after you've downloaded the file:

  1. Open the downloaded archive and extract the content
  2. Rename the .pl file to acdc.pl, if it's not already the case
  3. Copy the all.spawn from gamedata\spawns into the folder with the acdc.pl
  4. Create a .txt file, open it, copy this string into it perl acdc.pl -d all.spawn then save and close it
  5. Rename the .txt to decompile.bat
  6. Create another .txt file, open it, copy this string into it perl acdc.pl -c all.ltx -o new.spawn then save and close it
  7. Rename the .txt to compile.bat

Now you're ready to go.

Editing all.spawn

This section could use more info on the structure of all.spawn. If you can provide information, feel free to contribute! Atrocious

After you have set up everything, double-click the decompile.bat and wait for the process to finish. It should take some seconds. If the window is instantly closing, you have an error. Read the troubleshooting section then.

After the files have been extracted, you can edit them like any other .ltx file. They entries have numbers in brackets [ ] as section identifiers. Those identifiers must be unique over all .ltx files.

When you are finished, double-click compile.bat and wait until the new.spawn is finished. Copy the new.spawn into your STALKER gamedata\spawns directory, make a backup of the existing spawn file and rename the new.spawn to all.spawn.

Troubleshooting

If the decompiling breaks, it is most probably because your acdc.pl does not work with the all.spawn you use. Use the correct version for your STALKER patch version and use a suitable version if you try to decompile mods. If you can't get the correct version for the mod or version, you have to create it by yourself:

  • Open a dos box (cmd.exe) and make your way through the directories into the recently created all.spawn workspace
  • Once you are there, type decompile and hit enter
  • It will again attempt to decompile but it will fail. Now you should have an error message like:
unknown amk_zone_mincer_average at acdc.pl line 2256.

Your acdc.pl doesn't know amk_zone_mincer_average. Time to change that:

  • Right-click on acdc.pl and chose edit.
  • Scroll down until you find lines like these:
stalker => 'se_stalker',
stalker_monolith => 'se_stalker',
stalker_zombied => 'se_stalker',
stalker_trader => 'se_stalker',
stalker_sakharov => 'se_stalker',
m_barman => 'se_stalker',
m_osoznanie => 'se_stalker',

They are under section_to_class. Now you can add new items that have been added to the all.spawn in the same manner. Just make sure to point the new items to the right classes. The above example is for Stalker, but there are also examples for monsters and different items. The section from the error message is an anomaly from AMK, so we would have to add it as anomaly:

amk_zone_mincer_average => 'se_zone_anom',

Then save and close acdc.pl and try to decompile again. If it fails again (almost certain), check for the next unknown item and add it like the first.

Important: Before you even start working on a spawn file from another mod, ask the creators of the mod if you are allowed to alter their work. At least do it if you plan to release your changes as new mod. That should go without saying!

Personal tools