Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: the bigg
« on: May 24, 2010, 06:12:03 PM »

Done.
Posted by: devSin
« on: May 24, 2010, 05:18:34 PM »

Cool. Since fixup3 is just for SpellCastEffect, can it cat s2,s3 rather than reverse? (The others switch around to pull out the scope and position it, but this is just literal s2:s3 mashed together.) And then just fix up splitc to dump "S1:","S2", I guess (or better yet, just screw the split and return "S1:S2","" and let it concat normally on compile).

Also, for Load.IWD1, can you add to is_concat1
Code: [Select]
141l (* GivePartyGoldGlobal(S:Name*,S:Area) *)
165l (* AddexperiencePartyGlobal(S:Name*,S:Area) *)
247l   (* BitGlobal(S:String1*,S:String2*,I:Value,I:Mode*BitMode) *)
0x40A5l (* BitGlobal(S:String1*,S:String2*,I:Value,I:Mode*BitMode) *)
and
Code: [Select]
248l   (* GlobalBitGlobal(S:String1*,S:String2*,S:String3*,S:String4*,I:Mode*BitMode) *)
0x40A6l (* GlobalBitGlobal(S:String1*,S:String2*,S:String3*,S:String4*,I:Mode*BitMode) *)
to is_concat2?

It looks like this will fix up the Scope:Name in BAF issue I mentioned.
Posted by: the bigg
« on: May 24, 2010, 03:53:26 PM »

All should be in git: the *.bcs files you listed are unaltered by DECOMPILE_BCS_TO_BAF/COMPILE_BAF_TO_BCS; 11oswald.dlg (after fixing # -> ") doesn't spontaneously add colons to actions or triggers by DECOMPILE_DLG_TO_D/COMPILE_D_TO_DLG (it changes because WeiDU adds all those newlines between actions/triggers).
Posted by: devSin
« on: May 24, 2010, 03:44:52 PM »

Yeah, some of the dialogues have # in place of " quotes. I fixed them locally, but I never played the game; the engine probably muscles through a mistake like that regardless of the fact that it's bullshit (or it's an orphaned node that they just left dumb).
Posted by: the bigg
« on: May 24, 2010, 03:00:52 PM »

Code: [Select]
WARNING: cannot verify action ~StartCutsceneMode()
StartCutscene(#53cKulda#)~: Parsing.Parse_error
WTF
Posted by: devSin
« on: May 23, 2010, 09:00:30 PM »

Still have to do that colonoscopy. Can you give me script name(s) to work on?
Ouch. It looks like dialogues shouldn't have colons at all, though (the engine must be smart enough to compile it correctly, even though none of our compilers could), so decompiling to colon-free does have some use (have to be able to recompile 11OSWALD). AH HA HA HA HA!
Posted by: the bigg
« on: May 23, 2010, 01:52:12 PM »

Is this before the concat of the scope and name for vars (i.e., just checking strlen(name))? You can test with 53MALAVC in ID2.
SetGlobal("12345678901234567890123456789012","GLOBAL",1) will not whine, SetGlobal("123456789012345678901234567890123","GLOBAL",1) will.

I'll install ID2 for the rest.
Posted by: devSin
« on: May 23, 2010, 10:58:04 AM »

Check that strlen(first) <= 32 done.
Is this before the concat of the scope and name for vars (i.e., just checking strlen(name))? You can test with 53MALAVC in ID2.

Subrace <-> class done. I don't understand what I should do about that SUBRACE.IDS or AVCLASS nonsense.
Nothing. It was just me saying what they were.

Still have to do that colonoscopy. Can you give me script name(s) to work on?
65CSTATU is good for SpellCastEffect() nonsense. 50CARIT0 and 50LEEVI0 have some TimerRandom() calls, and AR50(19|20|30) have some GlobalRandom() calls.
Posted by: the bigg
« on: May 23, 2010, 08:41:32 AM »

Check that strlen(first) <= 32 done.

Subrace <-> class done. I don't understand what I should do about that SUBRACE.IDS or AVCLASS nonsense.

Still have to do that colonoscopy. Can you give me script name(s) to work on?
Posted by: devSin
« on: May 17, 2010, 09:20:54 PM »

Apparently, we don't even check this is NI, doh (I'll see about adding in a test in checkString() since we already check for everything under the sun, but we have much bigger compiler issues to be honest).
Turns out it took like two seconds to add this check in for us, so don't bother in WeiDU.

In ID2, the correct object spec seems to be EA GENERAL RACE CLASS SPECIFIC GENDER ALIGNMNT SUBRACE AVCLASS CLASSMSK (WeiDU currently swaps CLASS and SUBRACE). Subrace, however, is the byte value (0 or 1 or 2) and not the race/subrace dword from Subrace.ids. Still no luck with AVCLASS, but it and CLASSMSK are actually stored in the CRE file (word + dword at 0x3B4). AVClass looks like just a clone of class, but the engine doesn't seem to want to check (it likes any value for any object).
Posted by: devSin
« on: May 16, 2010, 12:14:13 AM »

Also, if possible and easy, maybe a MODDER strlen() <= 32 check for string params (>32 will never be valid for any IE) to dump a simple warning (it should still compile, since there are some scripts with too-long strings).

Apparently, we don't even check this is NI, doh (I'll see about adding in a test in checkString() since we already check for everything under the sun, but we have much bigger compiler issues to be honest).
Posted by: devSin
« on: May 15, 2010, 07:29:01 PM »

I've been blaming you, but it looks like this may be Fred's fault? What the Fruck were you thinking, Fred? Although, it makes your statement a little odd...

Worst case scenario, can't these be made to just decompile what they're supposed to be in the BCS (like IWD currently does, outputting the whole concatenated string in s1)? I just want it to decompile something that it can actually recompile into a working script, which means not screwing with the colon.
Posted by: devSin
« on: May 15, 2010, 06:48:45 PM »

It's fine if you don't want to make it work better, but it shouldn't be left breaking all the code where a colon is required (BitGlobal(), SetGlobalRandom(), and SpellCastEffect() can't be used as decompiled anymore because of the way it's manipulating the string params when decompiling). That's not an inconsistency; that's a bug.
Posted by: the bigg
« on: May 15, 2010, 06:45:31 PM »

Sorry, I have long since given up on BAF <-> BCS inconsistencies.
Posted by: devSin
« on: May 15, 2010, 06:41:06 PM »

I'm really unhappy with the handling of BIS string concat when decompiling BCS. (I don't remember they did this in PST, so why the hell did they even add it?)

Currently, something like BitGlobal() will decompile to "SCOPE:VARNAME","" (in IWD); in NI, we decompile to ":VARNAME","SCOPE" (and leave the colon, simply because we don't treat it different from Global()). Which isn't a big deal, except that compiling ":VARNAME","SCOPE" with WeiDU will put SCOPE into the second (worthless) string parameter (and will break the check in-game). Ideally, I'd like it to handle NI's ":VARNAME","SCOPE", its own "SCOPE:VARNAME","" (although, decompiling like this should probably be a bug because that's what the freaking scope string is there for), and the way it was always supposed to be "VARNAME","SCOPE" (and let the compiler handle adding the colon where it's needed), although doing it the right way is pretty optional at this point. (I'm pretty sure we can compile WeiDU's junk output in NI without complaint, but I don't want to test.)

When it comes to ID2, it's all just broken. Decompiling any concatenated string strips the colon permanently (so BitGlobal() or SetGlobal(Timer)?Random() will decompile to "VARNAME","SCOPE", permanently losing the colon--i.e., compiling to invalid "SCOPEVARNAME" instead of "SCOPE:VARNAME", and SpellCastEffect() decompiles to WHO,"SOUND","RETARD1","RETARD2",WHAT,SPEED,SEQUENCE, and RETARD1 and RETARD2 aren't even handled correctly unless they're both specified--e.g., "RETARD1:" will decompile to "","RETARD1" and then recompile to an empty "" string). Ideally, all the forms should work and be equivalent (IWD broken "SCOPE:NAME","", NI good-enough ":NAME","SCOPE", and your try-but-totally-fail ID2 "NAME","SCOPE") and SpellCastEffect() needs really special love to handle "S1","S2" & "S1:S2","" & "","S1:S2" & "S1:","S2 & "S1",":S2" (as well as all the completely empty or colon-only equivalents).

Although, honestly, getting rid of the "right" way (no explicit colon in BAF) seems like the easiest shot. I know somebody asked for it (and apparently couldn't even tell that you just ended up breaking it all), but get over it. It's not a big deal to just put the colon in your own damn self (and NI will never support auto-colon, at least not by my hand).