ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
Syntax Questions

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  09:05:45  3 July 2013
profilee-mailreply Message URLTo the Top
Stryker7
(Senior)
 
On forum: 10/25/2010
Messages: 52
Syntax Questions

I am starting to attempt to mod (merge mods) and am confused by some of the differences in syntax found in files,

Currently, I am attempting to merge the changes from SRP 1.0.2rc1 into SRP 1.0.1. Just to get a look at some of the code.

I am finding discrepencies and am wondering if the syntax has been changed.

Example: <text> blah blah blah <text />

The last part should be </text> just as found in html code ? The first tells the program to use this text, the 2nd tells the program, "Ok, that is it for that piece of text."

Is this correct ?

I am also finding

in SRP 1.0.1

<info_portion id="val_killer_roof_sniper_3_dead"></info_portion>

and in SRP 1.0.2 rc1

<info_portion id="val_killer_roof_sniper_3_dead">

notice the missing </info_portion> in the 2nd.

Has that portion become redundant ? Is it no longer neccesary to "close" the info_portion ?

It could be that the info_portion ONLY includes that part that is in the quotes and it knows that it is closing itself.

I know that this may all be common knowledge, even for newbie modders, but I am stumped and do not want to get into bad habits for syntax.

If the answers to this is included at the wiki or it is documented somewhere else, feel free to just point me in the right direction.

If this is the wrong thread, please delete.

Thanks for any help.
  11:44:48  3 July 2013
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
Messages: 1690
Your suspicions are correct: <text/> is just shorthand for <text></text>. Likewise, <info_portion id="xxx"></info_portion> and <info_portion id="xxx"/> are syntactically equivalent. However, in both cases, the shorthand is slightly faster for the game to parse, so it is the preferred method of notation, especially for larger files.
  12:33:53  3 July 2013
profilee-mailreply Message URLTo the Top
Stryker7
(Senior)
 
On forum: 10/25/2010
Messages: 52

---QUOTATION---
Your suspicions are correct: <text/> is just shorthand for <text></text>. Likewise, <info_portion id="xxx"></info_portion> and <info_portion id="xxx"/> are syntactically equivalent. However, in both cases, the shorthand is slightly faster for the game to parse, so it is the preferred method of notation, especially for larger files.
---END QUOTATION---



Thank you for clarifying and responding so quickly.
  13:25:56  3 July 2013
profilee-mailreply Message URLTo the Top
Stalkerstein
Senior Resident
 

 
On forum: 04/24/2010
Messages: 1991
http://www.w3.org/html/wg/drafts/html/master/syntax.html
  14:31:52  3 July 2013
profilee-mailreply Message URLTo the Top
Stryker7
(Senior)
 
On forum: 10/25/2010
Messages: 52

---QUOTATION---
http://www.w3.org/html/wg/drafts/html/master/syntax.html
---END QUOTATION---



Thank you sir for the reference, I will be making extensive use of it. I used to write HTML websites, using notepad, but the code has gotten so elaborate, that relearning, a refresher course is definitely needed.
  15:03:36  3 July 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
Also, instead of using notepad, use notepad++
It does syntax highlighting, and you can launch HTML and XML into a browser, so you can check its validity. And you can have multiple files open in it. Its a great little tool.
  15:58:38  3 July 2013
profilee-mailreply Message URLTo the Top
Stryker7
(Senior)
 
On forum: 10/25/2010
Messages: 52
Thanks for the suggestion ....


---QUOTATION---
Also, instead of using notepad, use notepad++
It does syntax highlighting, and you can launch HTML and XML into a browser, so you can check its validity. And you can have multiple files open in it. Its a great little tool.
---END QUOTATION---



RGR that, I already do use notepad++ and you are correct about the abundant and useful features and plugins. I am wearing out the compare plugin the last few days. I use Winmerge to find out which files in a folder tree are different, and then open them with notepad++ to SEE the differences. BTW, just rebooted to linux so I can get online to download the Hex Editor plugin for NP++ so I can look at the all.spawn and see if I can figure how to enable the stash box in the CS base in the swamps.

I guess It has been disabled in the SRP 1.0.2 rc1. If it is not too difficult or game breaking I may try to re-enable it.

I guess I told you how old I am when I refered to editing HTML in notepad *the old version". That was many years ago, before there were WYSIWYG HTML editors. That was even before I started using linux. hehehehe

But thanks SetaKat for the suggestion about notepad++.

Do You have a suggestion about another Hex Editor, that does side by side comparisons of a file like all.spawn ?
  23:58:40  3 July 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
Have a look around here (in the SoC or CoP forums) for a universal acdc tool. Very handy when working with the all.spawn, as it decompiles to ltx config files, and then allows you to recompile these files back into a new.spawn, which you then rename to all.spawn
  23:54:45  17 July 2013
profilee-mailreply Message URLTo the Top
Stryker7
(Senior)
 
On forum: 10/25/2010
 

Message edited by:
Stryker7
07/17/2013 23:55:25
Messages: 52
I want to be a STALKER hacker .....


---QUOTATION---
Have a look around here (in the SoC or CoP forums) for a universal acdc tool. Very handy when working with the all.spawn, as it decompiles to ltx config files, and then allows you to recompile these files back into a new.spawn, which you then rename to all.spawn
---END QUOTATION---



Hopefully not too off topic: Found an excellent site with all the tools, or so it would seem.

I downloaded the latest version of the universal acdc tool from May 2011 from here ...

[link]http://stalkerin.gameru.net/modules.php?name=Downloads&d_op=viewtheoned&lid=455 [/link]

Inside is a README, but google translate detects it as Vietnamese ?, but is still unreadable.

Does anyone have the ability, and willing to, tranlate the readme into english for an aspiring STALKER hacker? Or point me to a more accurate translate tool ?

Again, I hope that this is not too off topic, and thanks for any assistance offered.
  01:09:39  18 July 2013
profilee-mailreply Message URLTo the Top
angrydog
Senior Resident
 

 
On forum: 09/01/2009
Messages: 3341

---QUOTATION---
Inside is a README, but google translate detects it as Vietnamese ?, but is still unreadable.

Does anyone have the ability, and willing to, tranlate the readme into english for an aspiring STALKER hacker? Or point me to a more accurate translate tool ?

Again, I hope that this is not too off topic, and thanks for any assistance offered.
---END QUOTATION---



open the readme in notepad++
L click on ENCODING
L click CHARACTER SETS
L click CYRILLIC
L click on WINDOWS-1251
now you can cut and paste the text into Google translate and translate it RUS->ENG
copy the English text and save it at the bottom of the readme.

Quick & Dirty Instructions
when you unzip the acdc tool you'll end up with a folder containing the "acdc_universal.pl" file and a folder called "stkutils". to use the acdc tool you'll need to create two bat files in the same folder as the acdc tool:

Use notepad++ and save them as .bat files
DECOMPILE.bat
acdc_universal.pl -d all.spawn
pause

COMPILE.bat
acdc_universal.pl -c all.ltx
pause

assuming you have installed perl properly, place a copy of the vanilla all.spawn in this folder and dbl-click on the Decompile.bat file

you should see the command line box open, and the all.spawn should decompile, press any key to close the box. you should now have all the alife_XXX and way_XXX ltx files as well as the sectionX bin folders.

use a text editor to open the files and make your changes. save them and then dbl-click the compile.bat file to recompile the new all.spawn.

you should now have a file called all.spawn.new

rename this file to all.spawn and put in the the stalker directory spawn folder replacing the old one.

if you have any problems or more questions just post back and we'll try to help you.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2019 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.