Staredit Network

Staredit Network -> Modding Assistance -> What's wrong with this?
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-12 at 21:19:20
I think this'll be a quick fix, but I can't find the problem with this script. I assume it's the script. Basically, I've told the probe to use the ghost's flingy, and the ghost reads its .grp from the templar trail and its iscript from this one here. The Ghost flingy uses the Templar parameters except for the sprites.dat pointer, which is Ghost. The Ghost images has its defaults, too, except that its .grp is the templar glow. I added the Templar's death frames to the end of the templar glow as 69-75 (that is, 68-74 when it's compiled.)

Starcraft crashes as soon as a game begins with me as Protoss.

The script I believe is responsible is as follows:

CODE

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 228 Ghost (terran\ghost.grp)
.headerstart
IsId            70
Type            13
Init            GhostInit
Death           GhostDeath
GndAttkInit     GhostGndAttkInit
AirAttkInit     GhostGndAttkInit
SpAbility1      [NONE]
GndAttkRpt      GhostGndAttkInit
AirAttkRpt      GhostGndAttkInit
SpAbility2      [NONE]
GndAttkToIdle   GhostGndAttkToIdle
AirAttkToIdle   GhostGndAttkToIdle
SpAbility3      [NONE]
Walking         GhostWalking
Other           GhostOther
BurrowInit      [NONE]
.headerend
# ----------------------------------------------------------------------------- #

GhostInit:
playframno 0
wait  2
playfram 0x44
wait  2
playfram 0x45
wait  2
playfram 0x46
wait  2
playfram 0x47
wait  2
playfram 0x48
wait  2
playfram 0x49
wait  2
GhostOther:
playfram        0x00 # frame set 0
wait  2
playfram 0x11
wait  2
playfram 0x22
wait  2
playfram 0x33
goto            GhostOther


GhostDeath:
playsnd         238 # Terran\GHOST\TGhDth00.wav
playframno 0
wait  2
playfram 0x49
wait  2
playfram 0x48
wait  2
playfram 0x47
wait  2
playfram 0x46
wait  2
playfram 0x45
wait  2
playfram 0x44
end            

GhostGndAttkInit:
attack26
wait  1
gotorepeatattk
goto  GhostGndAttkToIdle

GhostGndAttkToIdle:
wait            1
goto            GhostOther

GhostWalking:
wait            1
playfram        0x00 # frame set 0
wait            1
playfram        0x11 # frame set 1
wait            1
playfram        0x22 # frame set 2
wait            1
playfram        0x33 # frame set 3
wait  1
goto            GhostWalking


Hopefully someone'll be able to fix this. I don't think it should be too hard, but I sure can't find the bug tongue.gif
Report, edit, etc...Posted by TheNomad on 2006-11-12 at 22:10:45
Would you hate me if I'd ask you to write the script for IceCC 1.3 ? smile.gif
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-12 at 22:34:03
Depends on where I'd need to go to find IceCC 1.3 tongue.gif I could, I guess, but I don't know where to get 1.3 as opposed to 1.1.
Report, edit, etc...Posted by ShadowFlare on 2006-11-12 at 22:35:23
Are you saying you are using a different .grp file than the ghost's one but mostly using the ghost's iscript?

BTW, IceCC 1.3 is an updated version by me. It is on my site, http://shadowflare.samods.org/ If you haven't done many (or any) of the iscripts for your mod yet, I would recommend switching to IceCC 1.3, since it has more identified opcodes and animation names (plus some fixed opcodes); also, switching at a later point rather than earlier will take more time, since you will need to change your scripts most likely. However, I will mostly likely make a program to help with converting scripts to the new names to help existing IceCC users switch to the new version.
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-12 at 22:37:05
I'm using a different .grp but have modified the script to reflect it.

Now that I've got 1.3 (Excellent work ShadowFlare, BTW,) here's the code, per TheNomad's request:

CODE

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 228 Ghost (terran\ghost.grp)
.headerstart
IsId            70
Type            13
Init            GhostInit
Death           GhostDeath
GndAttkInit     GhostGndAttkInit
AirAttkInit     GhostGndAttkInit
Unused1         [NONE]
GndAttkRpt      GhostGndAttkInit
AirAttkRpt      GhostGndAttkInit
CastSpell       [NONE]
GndAttkToIdle   GhostGndAttkToIdle
AirAttkToIdle   GhostGndAttkToIdle
Unused2         [NONE]
Walking         GhostWalking
WalkingToIdle   GhostWalkingToIdle
SpecialState1   [NONE]
.headerend
# ----------------------------------------------------------------------------- #

GhostInit:
setfldirect     0
wait            2
playfram        0x44 # frame set 4
wait            2
playfram        0x45 # frame set 4
wait            2
playfram        0x46 # frame set 4
wait            2
playfram        0x47 # frame set 4
wait            2
playfram        0x48 # frame set 4
wait            2
playfram        0x49 # frame set 4
wait            2
GhostWalkingToIdle:
playfram        0x00 # frame set 0
wait            2
playfram        0x11 # frame set 1
wait            2
playfram        0x22 # frame set 2
wait            2
playfram        0x33 # frame set 3
goto            GhostWalkingToIdle

GhostDeath:
playsnd         238 # Terran\GHOST\TGhDth00.wav
setfldirect     0
wait            2
playfram        0x49 # frame set 4
wait            2
playfram        0x48 # frame set 4
wait            2
playfram        0x47 # frame set 4
wait            2
playfram        0x46 # frame set 4
wait            2
playfram        0x45 # frame set 4
wait            2
playfram        0x44 # frame set 4
end            

GhostGndAttkInit:
attack          
wait            1
gotorepeatattk  
goto            GhostGndAttkToIdle

GhostGndAttkToIdle:
wait            1
goto            GhostWalkingToIdle

GhostWalking:
wait            1
playfram        0x00 # frame set 0
wait            1
playfram        0x11 # frame set 1
wait            1
playfram        0x22 # frame set 2
wait            1
playfram        0x33 # frame set 3
wait            1
goto            GhostWalking
Report, edit, etc...Posted by ShadowFlare on 2006-11-12 at 22:50:43
BTW, I don't see too many changes that would need to be made there to make it compatible with IceCC 1.3. The animation names would need to be changed to the new ones and also the opcodes updated to the new names (for the ones that were changed). The opcodes I see that would need to be changed are attack26 (changed to just "attack") and playframno (I think changed to setfldirect, abbreviation for set flingy direction).

-EDIT-

Looks like you already figured it out before I posted it. smile.gif
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-12 at 22:51:48
Meh, compile it to iscript.bin and decompile with the new one was all it took.
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 07:07:10
Here is the source.

Effects are as follows:

- When it walks, it makes a trail
- When it attacks it glows in anger (well blue anger that is tongue.gif)
- When it dies it fades out like the original HT

Notes:

- the selection doesn't work properly... I am not sure how to get it working for non-unit items, such as shadows, glows or flashes; if someone knows I'd love to hear tongue.gif
- it can't carry powerups (I suspect lo? files handle this) which means that if you harvest it will crash

Minor Note:
I used the crystal placeholder to create the HT fade-out death seq

Th effects I added were just to experiment a bit and maybe inspire you in doing some neat stuff. Enjoy!
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 08:33:43
If you'll read all posts then you'll know tongue.gif

Anyway from what I understood in the vague first post, he wanted a probe with the ghost flingy that uses the templar glow image with a custom script.
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-13 at 08:56:34
OK, here's what I want:

I took the Probe, Marine, and Firebat and had them all use the Ghost's flingy. The ghost's flingy uses the above iscript and a graphic that consists of the Templar glow with a few extra frames on the end (the original HT's death frames.) Nothing should happen when it attacks, and I can't even make it load. Whenever I start a game of SC as Protoss, it crashes. I'm almost positive this is the only change that would be causing it, as I haven't changed anything else lately.
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 09:10:20
(yeah the attack effect was an added experimentation tongue.gif)

OK so if I re-understood you (correctly I hope this time), you want a Marine with a Ghost image AND a Templar glow in the back ?

In the source I attached I used only the templar glow cos the first post is a bit vague and got me to understand you used the ghost as placeholder but in reality wanted the templar glow...

oki doki, I'll try to give you a ghost with a templar glow in the back and the HT fadeout death seq.
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-13 at 09:24:06
No, I don't want the original ghost graphic at all. It's replaced with the templar glow. The Ghost part of it is just a placeholder for the new script.
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 10:20:47
QUOTE(Lord_Agamemnon(MM) @ Nov 13 2006, 05:24 PM)
No, I don't want the original ghost graphic at all.  It's replaced with the templar glow.  The Ghost part of it is just a placeholder for the new script.
[right][snapback]588296[/snapback][/right]

well that is what i did in the source... check it how it works in game and how it works script-wise smile.gif
Report, edit, etc...Posted by ShadowFlare on 2006-11-13 at 11:20:12
Hmm, it might help if you posted the exact settings you are using for the flingy, the sprite, the image, and the number of frames in the grp.
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 12:29:43
Well he said he uses the Templar flingy only with the ghost sprite pointer, which means so did I smile.gif

I kinda showed him what he wanted and added the angry attack anim just for fun smile.gif
Actually his mistake was, I think, writing the frames which go over the maximum. He'll see that the glow in my script doesn't run any anims, apart from the rotation ones. The trail is done separately and the death "abused" the khaydarin crystal placeholder as mentioned smile.gif

He should also take note that the ghost grp is affected for ghosts and that the selection isn't done properly. I don't understand why everyone here doesn't get what I did tongue.gif
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-13 at 12:30:11
Flingy: Templar settings except for the Sprites.dat reference, which is the Ghost's.

Sprite: Default settings

Image: Terran Ghost has all boxes checked, uses grp thingy\pteglow.grp and iscript Ghost.

Number of frames: 4 sets of 17 each plus seven more (75 total frames)

So with that info, please just tell me if anything's wrong with the script I posted. I don't want anyone else to try making it for me or worrying about how it works. Just tell me what's wrong with the script.
Report, edit, etc...Posted by ShadowFlare on 2006-11-13 at 12:54:47
Hmm, in this block:

CODE
GhostInit:
setfldirect     0
wait            2
playfram        0x44 # frame set 4


...try removing the wait. I'm not completely sure, but you may need to not have a wait between setfldirect and the first playfram. I actually can't really think of any reason to ever have a wait between a setfldirect and playfram, since setfldirect doesn't actually set which specific frame set to use, just the direction.
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-13 at 14:19:36
Hm. Did that. Unfortunately, that's not it...it's also not the lack of a wait command at the end of the "WalkingToIdle" block. Any other ideas? It doesn't wait for anything to crash, just does it instantly.
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 14:26:38
I don't want to create a temporal paradox, but I will make one comment tongue.gif
Please don't get me wrong, but you say you don't want others to do it for me but to just tell you... in a way it's the same thing. Actually someone telling you will just make you learn something new, but not something on your own. If you'd have checked my iscript and then debugged it and compared it, you'd have learned a lot more than if we'd give you "on a silver platter" smile.gif

But since it's your thread I'll satisfy you.
The thing is, if you'd have read all my posts carefully, I already told you the problem.

The problem is you went OVER the maximum frames. 0x43 is maximum. That grp doesn't have more than 67 frames. Also, SF is wrong this time, the wait is irrelevant. The second problem is that setfldirect doesn't work here and causes a crash as well. My guess it has to do wit the fact that the image is controlled as "partially mobile" but I am not 100% sure. Still, remove it to avoid crashes.

Third problem that you WILL eventually encounter is that SC will crash when the HT dies. And fourth problem is also mentioned, that the unit can't be selected or targeted properly.

I assume you'll ask on how to make the death fadeout seq work. This time I'll simply say, check my Iscript since i did that wink.gif

Funny enough, I did in my script all you did here without knowing you did it too (since I made it from scratch). You used that flashing anim too apparently, but I only did it for attacking. Considering I did work on it, I suggest you check that zip I gave you in-game and tell me what you think.

So problems 1, 2 and 3 are fixed. I am still waiting for someone to find a fix for problem 4 (if there is any). I just hope it doesn't involve lo? editing or I will curse.

Glad I could help wink.gif
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-13 at 14:29:50
I added eight frames, so it goes over 0x43. The HT won't die because I'm going to remove the trail from its iscript and also copied the death frames instead of just cutting them. 0x43 + 8 = 0x4b.

Also, I changed the movement control to "Flingy.dat control." It doesn't help. I also added a warp-in animation, which doesn't help either...
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 14:45:58
As I said, not only remove the extra frames, but also remove the setfldirect line.
As long as the frames are of a maximum of 67 (43h) you won't get crashes. And if you do, then it must be some Images/Sprites setting. And btw, I said I think it's cos it should be set to "iscript control" but as I said, it's just a guess.

For more info check what I did. I used your script with the bad frames and the setfldirect removed and it worked, so you must have done smth bad if it still crashes.
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-13 at 14:49:28
I added frames to the grp, which will make the number of frames in it 75, that is 0x4a when the 0 frame is factored in. The setfldirection should work, since it's controlled by flingy (I could make it iscript-controlled, but I don't see what that would do other than ignoring flingy properties.) Use this grp and see if it works then.
Report, edit, etc...Posted by BroodKiller on 2006-11-13 at 15:10:27
It's just a wild guess but maybe "setfldirect" requires a lo? file linked from images.dat?
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-11-13 at 15:13:59
No, because bunches of things use it for their death animations. The Dragoon, Ghost, and Marine for starters.
Report, edit, etc...Posted by TheNomad on 2006-11-13 at 15:37:11
QUOTE(Lord_Agamemnon(MM) @ Nov 13 2006, 10:49 PM)
Use this grp and see if it works then.
[right][snapback]588424[/snapback][/right]


Yes and no... sometimes it works, most of the time it crashes.
I'd take the wildest guess ever and say it assumes the idle state (not anim) assumes you have the number of frames + 17 and it goes over it unwillingly. Can't have another explanation why it works, but not all the time...
Next Page (1)