i want help with scripting

Glabrezu

First time out of the vault
im using noid to compile/decompile

i can decompile a script and recompile some scripts, but with some of the scripts when i try to compile i get errors (even if i dont actually make any changes)

such as "syntax error on line 754 near '=='."

these are with scripts i just decompiled using noid, made no changes to and tried to recompile

these are scripts from the restoration 2.0 mod, i just want to look and see whats in them really, yes im nosey i guess, plus i may want to mess around and tinker just to see what i can do

as an experiment i changed the exp reward from telling Francis to run to 10k from 1k, just to see if it worked, it did and i changed it back
i want to see what else i can do

is there anyway to have noid recompile without checking for errors?
ive tried using the fallout 2 mapper, but it wont decompile files and it wont recompile decompiled files from noid
and FSE goes through the motions but does nothing other than delete the script its replacing

help appreciated, hope i made some sense (my programming knowledge is very basic)
 
I'm not an expert, but I do use Noid's compiler and have done a fair bit of working on FO2 scripts for my own amusement. I'm not sure if this will be helpful for you, but here are my thoughts (if anything below is factually incorrect, then anyone should feel free to point it out):

1) Be careful what sort of text editor you use while working on scripts, as you'll want to use a bare-bones plain text editor that doesn't add any hidden formatting symbols. I've occassionally seen some puzzling compiler problems that were solved by doing nothing other than copying the script text, pasting it into Windows Notepad (a plain text editor that removes any formatting symbols except tab stops), then (without making any changes or doing anything else) copying the text from Notepad back to whatever text editor I was using to work on the script, and then trying again to compile the script.

2) I don't think I've ever had a case, though, where I decompiled a script, did absolutely nothing to it, and had it fail to recompile. Perhaps you don't have the correct version of Ruby? As far as I know Noid's compiler requires a very specific old version of Ruby to work properly, and it's sort of confusing because Ruby has been around for a while and there are lots of very similar versions with very similar names that aren't quite identical. I don't remember for certain as it was some time ago, but I think I got the Ruby files I use with Noid's compiler from here. You want the one called "ruby-1.6.8-1-i386-mingw32.tar.gz", not the other one on that page. Just from that page alone, though, you can see what I mean about how the filenames are similar but the content is different. I'm also pretty sure the version of Ruby linked up on the NMA mod guide section isn't the correct one either, but you could try it I guess if you haven't already done that.

3) Something to keep in mind with Noid's compiler is that you may occassionally see a line like "asm:" followed by some letters and numbers. This is due to new script functions from sfall (which didn't exist when Noid made his tools). Although they will decompile and recompile fine, figuring out what these lines actually refer to is beyond me.

4) Ideally one would want to use FSE to make everything much easier. I was never able to get it to run for me, though, which is why I use the older compiler. However even if one had a working FSE installed, it's a problem to use this tool if one wants to work on scripts from the RP, Megamod, or other mods since FSE requires an accurate set of header files. Since most mods don't include these source files (big bonus 8-) points to Nirran, by the way, for including source files for all his mods), FSE can't effectively decompile, allow editing of, or recompile them. Therefore if you want to work on scripts from the RP, you're doing the right thing by trying to learn how to use Noid's decompiler.

Hopefully at least one of those ideas will help.
 
hey thanks for the answer, i think that is indeed a different version of noid, im going to try out what you have suggested and see what happens (when i get some time)
and yeh i havent got fse working correctly either, i can use it to look at scripts but thats about it

Ok sadly, nothing worked, i downloaded that version of noid, i tried again, i did the copy and paste etc, didnt work either, bah humbug, thanks anyways though
 
You probably did all this, but it wasn't clear from your second post so sorry if this is overkill:

1) Download the Ruby files from the site I mentioned;
2) When you unzip that file, it has to go at the root level of your hard drive; for example don't put it at C:My Documents\Fallout Stuff\usr\, put it at C:usr\;
3) Install Noid's compiler over top of wherever you put the Ruby files; basically you just move the files for Noid's compiler into the matching folder from the Ruby installation, overwriting any existing files;

Is there one particular script you're having trouble decompiling/recompiling, or is it quite a few of them?
 
yeh i was a little vague wasnt i, funny how sometimes people forget whats clear to them when their writing may not be clear to the reader so they miss out little but vital steps, so my apologies

yeh i extracted noid into the root directory c:
the ruby exe is in c:\usr\local\bin
im using just notepad

and its quite a few im having trouble with, i just tried an experiment that didnt work, i decompiled a file and just looked in with notepad rather than fse, did nothing, and tried to compile again
another message i get is blah blah blah missing ')' in line xx
but like i said i have made no changes to them

maybe its just that noid is having trouble with the fallout restoration mod format?

oh and another thing you probably already know this BUT, you never know
i read somewhere about mass compiling/decompiling (for another game, funny it never worked for it, maybe id set up the programs wrong), and it works :D

in command box after going to the appropriate directory type

ruby decompile *.int

that will decompile everything in the folder with .int extension, very handy and saves you having to type the full name of the file/s
(oh and i tried that also: ruby compile cck9.ssl etc instead of *.ssl incase that was the problem)

i was trying to make nikki in new reno have the money you give her for finding out lloyds location in her inventory, wouldnt compile
but my experiment with francis in broken hills did work (changed the exp award just to see if i could)
so some work, some dont, its a pain because the ones i want to work seem to be the ones that dont, and im rambling now huh, so ill stop
 
Did ruby comes with noid compiler?
If no, did you download the oldest version possible of ruby?
I remember that I had some problem with the newest ones...
 
the ruby came with noid, i got it from here somewhere, now im using the one that Endocore suggested, do you have a link to another ruby that would work?
 
@Grayswandir and Glabrezu
Noid's compiler comes with some customized Ruby files, but not a whole Ruby installation. The user has to supply that themselves, but that's still do-able as the link I provided earlier in the thread is the exact Ruby version Noid mentioned in his readme file.

@Glabrezu
I'm not sure why you're having trouble, as it sounds like you're doing things correctly. An .int file is an .int file, so there aren't really any issues (except what I noted earlier about deciphering the "asm" assembly code stuff) that would get in the way of working with RP scripts vs other scripts, and I haven't experienced any problems myself decompiling and recompiling a fair number of RP (and Megamod, etc) scripts.

I tried the two RP 2.0 scripts you mentioned specifically (cck9 and ncnikki); I decompiled them then recompiled them without any problem. Or were you saying those were ones that wouldn't recompile after you made your changes?

Sorry I can't be more helpful. The bad news is my impression is that almost everybody uses FSE these days, so I don't think too many old-timers who are experts on Noid's compiler are still around to help get to the bottom of your issues.
 
yeh those two files never worked with me, they decompiled but wouldnt recompile... so somewhere along the lines im making a mistake
 
Mmm, sorry, I didn't read endocore's post entirely. I had indeed the same problem as you long time ago, but using ruby-1.6.8 fixed that.

If it persists, you might want to use watcom instead.
 
I was just looking for someone to help me with a few scripts regarding a large map I have been modifying. Would anyone here be capable of assisting me with a few things? I never wrote any scripts.
 
@Ravager
If you have specific questions I'm sure folks will be willing to help and answer them, but in general the best way to learn is by doing. It's hard because everyone's hobby time is limited, but if you're trying to learn how scripts work pick a few existing ones that you know (from playing the game) probably do something similar to what you want to do, open up all the header files from the scripts that come with the mapper as well as vault13.gam, and then just go through the scripts line by line until you understand how they work and what all the commands and variables do. This takes time, but when you're finished you'll be glad you did it.
 
OK

I need a script for computer terminal that will shut down all of the force fields on the level.

I also need a script for a damaged elevator door which won't open unless you have a high repair skill.

And a script for an elevator
level G-1
levels 2-4
and
level 4-5
 
@Ravager
For the computer terminal, you'd want to look at some scripts from the Sierra Army Depot.

The damaged door wouldn't be too hard, just add a skill check section to a lockable door script.

For the elevator, my understanding is one is a lot better off using sfall to handle these. You'd probably want to check out the developer kit files from Timeslip's site as it has details on how to mod using sfall.
 
http://falloutmods.wikia.com/wiki/Sfall

I checked it, but I'm not sure if it will work well with the RP mod. What if it messes something up after I installed it? I also tried to look at the home page but the link from wiki didn't work.

Would you be interested in checking out my map? I just need those few scripts for the elevators and force fields like I mentioned.

1 mining elevator (G-1)

2 elevators (1-4) like in Lost Hills Bunker
http://fallout.wikia.com/wiki/File:Fo1_Lost_Hills_Level_4.png

1 small elevator/or exit grid for level 5 (Sub Level Blue)

And 1 script for a terminal that would shut down all the force fields.

I was also planning an alternative medical computer similar to the one from San Francisco (in the BoS outpost) and some computer logs, but that's optional.

If your interested and have the time for this here's the map:

http://www.mediafire.com/file/kmo01twmjj5/epax.map

http://rapidshare.com/files/375883334/epax.map.html

It uses RP 2.0 mod, but it's more based on 1.2 yet a lot better from it's visual side.
 
Actually you should look at these things to learn about how to use sfall to make elevators.

There can never be too many mods, as new stuff = more interest = more people in the community to make even more new stuff. The screenshots of your map in the other thread look pretty nice, and I wish you luck on your project. I can't help you in the direct way you're suggesting, but like I said earlier if you have specific questions about how to do certain things there are lots of folks around who will try to answer them for you (but if it were me I'd bring them up in my own thread rather than someone else's).
 
Back
Top