Unknowns

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Unknowns

Postby Heinermann » Thu Dec 04, 2008 6:30 am

Based on observation.
SFXDATA.DAT
Unknown 1(flags?):
0x01 = Enabled?
0x02 = Can be heard long distances.

Unknown 2(flags):
0x01 = Menu (Always play sound)
0x02 = Belongs to a source unit.
0x10 = Use target as sound source instead.
0x20 = Can be heard from a distance

Unknown 3(race): Race (Zerg, Terran, Protoss)
Unknown 4(percentage): Volume % on mute unit speech trigger?


UNITS
ADVANCED TAB
Animated Idle(?) should be animated overlay.
Pickup item(?) should be can be picked up(worker)
Produces Units(?) should be produces/orders ground units
0x01 does not respond to right click action??
0x04 is air unit
0x40 responds to valid/standard commands

Unknown(u16) is the unit requirements index. (This is updated and used internally)

AI ACTIONS
AI Internal: > 0x00 ignores strategic suicide mission. Should be a flag?


FLINGY
Unused: Looks like it could be a bitfield for the animations pulled from iscript.bin if the move control is not set to iscript.bin


SPRITES
The selection circle should be able to index any graphic after its base index.


IMAGES
Function 1 (Unknown1) is overlay on target
Function 14 (Unknown14) is flag(special case)


TECHDATA
Unused is default researched flag
Unknown1(u16) is the research requirements index. (This is updated and used internally)
Unknown2(u16) is the ability requirements index. (This is updated and used internally)


UPGRADES
Unknown(u16) is the upgrade requirements index. (This is updated and used internally)


ORDERS
Unknown(u16) is the order requirements index. (This is updated and used internally)
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Thu Dec 04, 2008 10:52 pm

Wow, great info! Are you 100% sure about the things without '?' after them? Also:

Sfxdata:
There are 2 "Can be heard at long distances" flags?
Unknown 3(race): Seems to be true only for the building placement sounds (0 = ZBldgPlc, 1 = TBldgPlc, 2 = PBldgPlc), but is 0 for everything else?

PyGOT doesn't contain any unknowns because it was modeled after Blizzards own GOT editing program Game Template. If the unknowns actually have a function then I would love to add them to the program.

Advanced Units:
Pickup Item: Seems right, except the Flag unit doesn't have it enabled?
"produces/orders ground units": Can you expand on this a bit more?
"0x40 responds to valid/standard commands": Can you expand on this a bit more too? It seems like it might be, but nuclear missiles have it enabled?

AI Internal: Did you mean "== 0x00" responds to strategic suicide missions? First few units are set to 0, but the turrets are set to 3.

Selection Circle: Alright. Do they all behave the same? Hercanic said that the largest sized selection circle (from the current selectable list) shows on top of units instead of under them. Do you happen to know anything about this? I'll probably end up testing this but if you already know that would save some time.

Thanks again, keep em coming :D
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Tue Dec 09, 2008 4:21 am

Wow, great info! Are you 100% sure about the things without '?' after them?

This is just merely from observation of current data. None of this was tested yet.

PyGOT doesn't contain any unknowns because it was modeled after Blizzards own GOT editing program Game Template. If the unknowns actually have a function then I would love to add them to the program.

Well then they are unused. :P

Pickup Item: Seems right, except the Flag unit doesn't have it enabled?

The flag is a special case. Flags can't be picked up by the players that own them.

"produces/orders ground units": Can you expand on this a bit more?

From what I see, any unit that has this flag checked can either produce units or indirectly order a unit to do something. (Bunker has it enabled I think)

"0x40 responds to valid/standard commands": Can you expand on this a bit more too? It seems like it might be, but nuclear missiles have it enabled?

The nuclear missile responds to valid commands (the reason why a "nuke hack" was possible)
By standard I mean Move and stuff.

AI Internal: Did you mean "== 0x00" responds to strategic suicide missions? First few units are set to 0, but the turrets are set to 3.

Oops. Yes that's what I meant.

Selection Circle: Alright. Do they all behave the same? Hercanic said that the largest sized selection circle (from the current selectable list) shows on top of units instead of under them. Do you happen to know anything about this? I'll probably end up testing this but if you already know that would save some time.

No idea.


Also a bit of feedback from me:
Great tools. Does the iscript editor do error checking? Does it deal with the 0xFFFF offset limit? Does it use iscriptx? Optimization?
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Tue Dec 09, 2008 5:16 am

Thanks, they seem like very very plausible descriptions for things!

[quote name='Heinermann' post='5492' date='Dec 8 2008, 11:21 PM']Great tools. Does the iscript editor do error checking? Does it deal with the 0xFFFF offset limit? Does it use iscriptx? Optimization?[/quote]
Thank you very much! Yes it does in depth error checking, and yes it gives an error on compile when the offset limit is reached. Currently it does no optimization, though I have been thinking about adding the option to optimize your iscript.bin when saving. And what is iscriptx? Never heard of it.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Tue Dec 09, 2008 5:21 am

iscriptx is the Broodwar equivalent of iscript, much like bwscript is the equivalent of aiscript.

Also, the Unknowns in iscript are really unused. They have no case values in Starcraft's code, making them invalid(or skipped? not sure).
I wonder if extra calls and jumps will still sync with players that don't have them, that way, we can make an uncrashable iscript mwahahaha!
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Tue Dec 09, 2008 5:47 am

:o I never even knew there was such a thing! I'll have to look into it! Does it use the same format as iscript.bin? And is adding something to it pretty much the same to starcraft as adding it to iscript.bin? Very cool!

Edit: Well DoA says its not used at all so i guess theres no point looking into this :(
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Tue Dec 09, 2008 2:38 pm

He's right, it's not used. Didn't realize that. :D

I'm going to do some experimentation with iscript.

EDIT:
You have some problems.
Things like
Parameter Error: Invalid WeaponID value '63', it must be a number in the range 0 to 130
Line 5466: useweapon 63


Open the default iscript.bin and try to save it, will give you several errors. Like play random sound states that it has 3 parameters, but only has one (might be length and not number of entries?).
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Tue Dec 09, 2008 5:13 pm

Opening then saving the default iscript gives me no errors. Also errors like that parameter error will only show up when compiling code in the script editor or import code, so what code did you try to compile?
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Tue Dec 09, 2008 8:35 pm

This is exactly what I did:

1. Extract latest iscript.bin from patch_rt.mpq to replace the existing default.
2. Open the default iscript.bin in PyICE.exe
3. Select ALL Images entries.
4. Click Edit IScript Entries
5. Use CTRL+S (Save)
6. Receive the following error:

Code: Select all

Interpreting Error: Incorrect amount of parameters (got 1, needed 3)
   Line 2300: playsndrand         3 891
DiscipleOfAdun
Posts: 37
Joined: Sat May 05, 2007 9:39 pm

Postby DiscipleOfAdun » Tue Dec 09, 2008 9:00 pm

Most of the unused fields are labeled such because the SC engine actually doesn't use them directly. They can be thought of as references or something, because they normally do correspond to other data that is set in the engine, such as the Techdata flag.

Also, for some of the stuff, compare against datedit(mainly the units.dat info), i spent a lot of time reverse engineering sc to figure stuff out, and i only passed the info on to BK when he was making that.

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 1 guest