Staredit Network

Staredit Network -> Concepts -> TRIGGERS OF GOD
Report, edit, etc...Posted by Ninebreaker on 2005-07-27 at 00:25:03
QUOTE
Urgh, When I try to put the trigger in I get this:


--------------------------------------------------------------------------------


Run-time Error '6':

Overflow


Exact thing happened to me...
Report, edit, etc...Posted by ShinRa_Soldier on 2005-07-27 at 00:26:58
QUOTE(Ninebreaker123 @ Jul 26 2005, 11:25 PM)
Exact thing happened to me...
[right][snapback]271459[/snapback][/right]




The number is too big for Starforge can anyone help fix this?

I can view triggers that have numbers that High but I cannot make triggers that have numbers that high.
Report, edit, etc...Posted by pimpinelephant on 2005-07-27 at 00:33:43
i asked that and DK suggested using a hex editor

Oh, and LegacyWeapon, thank u, thats a nice explanation.
Report, edit, etc...Posted by ShinRa_Soldier on 2005-07-27 at 00:39:04
QUOTE(pimpinelephant @ Jul 26 2005, 11:33 PM)
i asked that and DK suggested using a hex editor

Oh, and LegacyWeapon, thank u, thats a nice explanation.
[right][snapback]271465[/snapback][/right]




Where can I get a hex editor?

Wiat maybe its a bad idea to announce in on the forum if someone could just PM it to me that would be great thx.
Report, edit, etc...Posted by Dr.Shotgun on 2005-07-27 at 00:42:21
Idea-
Use techs to modify map things by player will. Using the tech death thing as a condition, one of the modiefiers as an action! So we could have terran armor add shields for some units. Is there a way to erase shields once their given? Can we change the strings SC uses for techs.
This goes way beyond modding.
Report, edit, etc...Posted by pimpinelephant on 2005-07-27 at 00:47:14
so, for the shields trigger, you need to multiply the deaths by 256 for every Unit ID? if so, then i think i get it now.

Now, is there a way to put in the unit number without SF crashing?
Report, edit, etc...Posted by Ninebreaker on 2005-07-27 at 00:55:51
QUOTE
Would it look like this?:
? SetDeaths(P4,SetTo,6B6740,35748); ?


Im prety sure it would be like this, but i get a diff error when i try it


Trigger: SetDeaths(P4,SetTo,35748,6B6740);

Error:
Parameter Parse Error
6B6740
Expected Numeric Value

What would that mean?

EDIT: SF does not crash afterwords...
Report, edit, etc...Posted by pimpinelephant on 2005-07-27 at 00:57:27
QUOTE(LegacyWeapon @ Jul 26 2005, 08:00 PM)
Ok the shield post is here:
http://www.staredit.net/index.php?showtopi...ndpost&p=270929

6B6740 - deaths of unit 35748 for player 4
6B6744 - deaths of unit 35748 for player 5

See how it's 6B6740 - 6B6744 which is a range of 4 bytes. Each one of those bytes alters a different unit's shield availability.

BTW the shield availabilities start here:
6B673C - deaths of unit 35748 for player 3

So to add shields for a unit (with the ID 1), you will need this trigger:
SetDeaths(P3, Add, 1, 35748);
If you wanted to add shields for a unit (with the ID 2), you will need this trigger:
SetDeaths(P3, Add, 256, 35748);
If you wanted to add shields for a unit (with the ID 3), you will need this trigger:
SetDeaths(P3, Add, 65536, 35748);
And if you wanted to add shields for a unit (with the ID 4), you will need this trigger:
SetDeaths(P3, Add, 16777216, 35748);

Now to add shields for a unit (with the ID of 5), you will need this trigger:
SetDeaths(P4, Add, 1, 35748);

etc. I think you should get it now...
[right][snapback]271375[/snapback][/right]


Legacy just went through this...
except 35748 and such aren't accepted in SF for some reason, probably cuz it doesn't even exist
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-27 at 00:57:50
>>>Legacy.parse(DK_post)

ENABLING SHIELDS (add to enable, subtract to disable)

TERRAN MARINE: SetDeaths(P3, Add/Subtract, 1, 35748);
TERRAN GHOST: SetDeaths(P3, Add/Subtract, 256, 35748);
TERRAN VULTURE: SetDeaths(P3, Add/Subtract, 65536, 35748);
TERRAN GOLIATH: SetDeaths(P3, Add/Subtract, 16777216, 35748);
TERRAN GOLIATH TURRET (will this crash?): SetDeaths(P4, Add/Subtract, 1, 35748);
TERRAN SIEGE TANK (TANK): SetDeaths(P4, Add/Subtract, 256, 35748);
TERRAN SIEGE TANK (TANK TURRET) (crash?): SetDeaths(P4, Add/Subtract, 65536, 35748);
TERRAN SCV: SetDeaths(P4, Add/Subtract, 16777216, 35748);
TERRAN WRAITH: SetDeaths(P5, Add/Subtract, 1, 35748);
TERRAN SCIENCE VESSEL: SetDeaths(P5, Add/Subtract, 256, 35748);
TERRAN FIREBAT: SetDeaths(P5, Add/Subtract, 65536, 35748);
TERRAN DROPSHIP: SetDeaths(P5, Add/Subtract, 16777216, 35748);

And so on for all the units, in type order.

Note that viewed in binary, the full long at 0 looks like this.

00000000 00000000 00000000 00000000 (00 00 00 00 HEX)

Changing any one byte to anything other than 0 enables shields for that unit.

01 00 00 00 is the same as A4 00 00 00.

Confused?
1 = 00 00 00 01
256 = 00 00 01 00
65536 = 00 01 00 00
16777216 = 01 00 00 00

So adding 1 and 16777216 would make = 01 00 00 01.

These number's aren't random wink.gif
Report, edit, etc...Posted by ShinRa_Soldier on 2005-07-27 at 01:00:10
QUOTE(DT_Battlekruser @ Jul 26 2005, 11:57 PM)
>>>Legacy.parse(DK_post)

ENABLING SHIELDS (add to enable, subtract to disable)

TERRAN MARINE: SetDeaths(P3, Add/Subtract, 1, 35748);
TERRAN GHOST: SetDeaths(P3, Add/Subtract, 256, 35748);
TERRAN VULTURE: SetDeaths(P3, Add/Subtract, 65536, 35748);
TERRAN GOLIATH: SetDeaths(P3, Add/Subtract, 16777216, 35748);
TERRAN GOLIATH TURRET (will this crash?): SetDeaths(P4, Add/Subtract, 1, 35748);
TERRAN SIEGE TANK (TANK): SetDeaths(P4, Add/Subtract, 256, 35748);
TERRAN SIEGE TANK (TANK TURRET) (crash?): SetDeaths(P4, Add/Subtract, 65536, 35748);
TERRAN SCV: SetDeaths(P4, Add/Subtract, 16777216, 35748);
TERRAN WRAITH: SetDeaths(P5, Add/Subtract, 1, 35748);
TERRAN SCIENCE VESSEL: SetDeaths(P5, Add/Subtract, 256, 35748);
TERRAN FIREBAT: SetDeaths(P5, Add/Subtract, 65536, 35748);
TERRAN DROPSHIP: SetDeaths(P5, Add/Subtract, 16777216, 35748);

And so on for all the units, in type order.

Note that viewed in binary, the full long at 0 looks like this.

00000000 00000000 00000000 00000000 (00 00 00 00 HEX)

Changing any one byte to anything other than 0 enables shields for that unit.

01 00 00 00 is the same as A4 00 00 00.

Confused?
1 = 00 00 00 01
256 = 00 00 01 00
65536 = 00 01 00 00
16777216 = 01 00 00 00

So adding 1 and 16777216 would make = 01 00 00 01.

These number's aren't random wink.gif

[right][snapback]271487[/snapback][/right]



I still get runtime error '6' Overflow

I knew the trigger to enter the problem is, SF won't let me enter it !!
Report, edit, etc...Posted by l2k-Warrior on 2005-07-27 at 01:00:15
I played the Map of Insanity and it almost inspired me to make a Spaceballs map playable in ludacris speed
Report, edit, etc...Posted by Ninebreaker on 2005-07-27 at 01:00:31
THAT's the kind of list that doesn't confuse me ermm.gif

EDIT: im also getting that error...

EDIT2:
QUOTE
except 35748 and such aren't accepted in SF for some reason, probably cuz it doesn't even exist


Then what should i use? Where can i get it?
Report, edit, etc...Posted by Subrosian on 2005-07-27 at 01:01:59
I'm having trouble renaming the actions/conditions.lst files for Starforge when trying to replace them with Deathknight's conditions/actions list file attachment.

When I rename it, an error pops up, saying:

Cannot rename Actions: Access is denied.
Make sure the disk is not full or write-protected
and that the file is not currently in use.


And the disk ISN'T full or write protected and Starforge is closed. Any suggestions?
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-27 at 01:03:23
To enter unit ID's as a unit, you need the custom actions.lst and conditions.lst that Deathknight attached back on page 3.
Report, edit, etc...Posted by Ninebreaker on 2005-07-27 at 01:06:46
I extracted those into my Starforge plus data folder.... is that not what im supposed to do?

BTW Still getting runtime error...
Report, edit, etc...Posted by ShinRa_Soldier on 2005-07-27 at 01:08:18
QUOTE(Ninebreaker123 @ Jul 27 2005, 12:06 AM)
BTW Still getting runtime error...
[right][snapback]271511[/snapback][/right]


Yeah, Before I just couldn't view the triggers at all, I added the data files and now I can view the triggers, but I still get the runtime error when editing the triggers.
Report, edit, etc...Posted by Dr.Shotgun on 2005-07-27 at 01:08:35
That wasnt the question DTBK.
Try reinstalling StarForge.
Report, edit, etc...Posted by pimpinelephant on 2005-07-27 at 01:09:59
ok, i did some testing, and i found this out:

If you cannot put 35748 etc. into StarForge, then put "-29788". This also works, although i have not tested it on all of the units, it worked on the ones that i did test.
Report, edit, etc...Posted by Ninebreaker on 2005-07-27 at 01:12:13
Yay... finally ONE works. Ty...
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-27 at 01:35:15
QUOTE(pimpinelephant @ Jul 26 2005, 10:09 PM)
ok, i did some testing, and i found this out:

If you cannot put 35748 etc. into StarForge, then put "-29788". This also works, although i have not tested it on all of the units, it worked on the ones that i did test.
[right][snapback]271521[/snapback][/right]


-29788 MOD(65536) = 35748. That's why.
Report, edit, etc...Posted by pimpinelephant on 2005-07-27 at 01:40:53
oh i c. what would be the equivalent of 35749, 35750, etc.?
Report, edit, etc...Posted by ShinRa_Soldier on 2005-07-27 at 01:44:17
I don't know if this is helpfull or not but, I was messing around with the sheilding units and It seems that if you put in the number 511 into the death trigger like this:

SetDeaths(P3, Add, 511, -29788);

Then it gives a marine and a ghost sheilds

To give a marine sheilds you have to put 1, and to give ghost a sheild u have to put 256, well i thought 1 + 255 = 256 so then 256 + 255 = 511, and that gives them both sheilds. So if you add the unit numbers together and put that in it gives them both sheilds, I think this is right I have only tried it with those two units though.

Edit:

I just used the number 16843263 and it gave the marine, ghost, vulture, and golith sheilds, I belive any number above that will work also.

Edit2:

Accually only 16843263 will work any number higher and the units have no shields.
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-27 at 02:23:37
Let me again explain how it works. Number of deaths is a long (4-byte data variable) in hex it looks like this:

00 00 00 00

For each player/unit of deaths, each byte represents whether a unit has shields (00 = no, any other value = yes)

511 in hex is 1FF (00 00 01 FF)

00 00 00 00 + 00 00 01 FF = 00 00 01 FF

the last two bytes are true so those units have shields.

You also used 16843263. This is 10101FF (01 01 01 FF), which makes all 4 bytes positive.

16842923 (01 01 00 AB) would enable for 3 of the bytes, and so on.

QUOTE
oh i c. what would be the equivalent of 35749, 35750, etc.?


35749 = -29787 (just subtract 65536)
Report, edit, etc...Posted by ShinRa_Soldier on 2005-07-27 at 03:32:57
Okay lettme ask you this:

the last number (-29788) thats what makes the marine have sheilds right.

So...There is a different last number for cloaking the units for example lets just say (-29789) made units cloak, so If I put:

SetDeaths(P3, Add, 1, -29789);

Would that make a marine be cloaked (If -29789 really made units cloak) or would all the numbers be different?
Report, edit, etc...Posted by MarcX on 2005-07-27 at 03:44:53
Eh, DK, I'm willing to explain. Let's talk on AIM or MSN, or email.

AIM: RulerOfMahu
MSN: Diasomi@hotmail.com
Email: ILove2Talk@gmail.com






This was discovered way back, by the way. It's just that DK has a thing of sharing things with the public. I'm rather annoyed by the fact everyone treats him like a god, while he most certainly isn't the cleverest person around.
Next Page (8)