Staredit Network > Forums > Modding Assistance > Topic: Changing tanks to marines
Changing tanks to marines
Jan 1 2009, 6:22 pm
By: RoryFenrir
Pages: < 1 2 3 >
 

Jan 6 2009, 4:19 am RoryFenrir Post #21



good call modmaster, it works fine now! I might have to make you a grp for the help lol :)

Sweet, so now only to make the sige base move... so could someone look at my stuff and see what im doign wrong?



None.

Jan 6 2009, 7:35 am slient Post #22



Changing the time does work, I've shortened the time for my own Viking unit (total wait is not 38, I have it at 10 for base and 6 for the turret going to siege mode). Mess around with it and see what works.

Try setting the movement control to flingy.dat and using that instead of the iscript. I switched both tank bases to use flingy.dat and set acceleration and top speed to the same value with zero halt distance as a workaround for getting the bases to move.
I just remembered something, try checking Battle Reactions and Full Auto-attack in units.dat for the base too... might want to try that before going to flingy.dat

Post has been edited 1 time(s), last time on Jan 6 2009, 7:41 am by slient.



None.

Jan 7 2009, 12:01 am RoryFenrir Post #23



the attack works fine for the base now, but when i try to move it crashes (this is after checking battle reactions and auto attack flags)



None.

Jan 7 2009, 1:38 am modmaster50 Post #24



In my experience, move crashes are usually associated with iscript problems. However, I suck at using playfram and cant do much iscript checking for you (and managed to cause a move crash myself in SCNA when trying to make a move script). If you check the iscript and its fine, I would suspect a tank-turret desync when you try to move.



None.

Jan 7 2009, 3:00 am Angle Lock Post #25



Quote
I would suspect a tank-turret desync when you try to move.


I tend to agree..

I still left the siege mode for iscript to control, but I used flingy.dat control for siege turret and changed it to some random numbers...

And mine works...

So i guess that MIGHT be the problem...



None.

Jan 7 2009, 3:50 am modmaster50 Post #26



Quote from Angle Lock
I still left the siege mode for iscript to control, but I used flingy.dat control for siege turret and changed it to some random numbers...

Wait, so you mean you left the tank base as iscript control*, but changed the turret's movement to use flingy.dat control. That is exactly how the goliath works. As for putting random values in the flingy, I doubt the values matter, as the turret doesnt not move with its own speed. The goliath turret has "1" in all values. To be safe, I would give the base and turret the same turn radius.

Still, I dont completely understand why choosing iscript or flingy.dat movement control would matter for a unit that doesnt even move by itself. Well, if it works, it works! :P

*I assume thats what you meant by "I still left the siege mode for iscript to control" ;)



None.

Jan 7 2009, 4:16 am RoryFenrir Post #27



Gah.. i thought this would be it but i guess not....
---for turret---
top speed: 1
accell: 1
halt distance: 1
turn radius: 13
Flingy.dat Control

for tank it is the same except for iscript control....

this is my iscript for the seige tank, same movement as normal tank, but different inits (each have their own turret)
I used SSeige tank because i copied and pasted, this code should be all right thought, the attack works fine...

Quote
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 253 SiegeTankSiegeBase (terran\stank.grp)
.headerstart
IsId 92
Type 23
Init SSiegeTank_Tank_BaseInit
Death SSiegeTank_Tank_BaseDeath
GndAttkInit SSiegeTank_Tank_BaseGndAttkInit
AirAttkInit SSiegeTank_Tank_BaseGndAttkInit
Unused1 [NONE]
GndAttkRpt SSiegeTank_Tank_BaseGndAttkRpt
AirAttkRpt SSiegeTank_Tank_BaseGndAttkRpt
CastSpell [NONE]
GndAttkToIdle SSiegeTank_Tank_BaseGndAttkToIdle
AirAttkToIdle SSiegeTank_Tank_BaseGndAttkToIdle
Unused2 [NONE]
Walking SSiegeTank_Tank_BaseWalking
WalkingToIdle SSiegeTank_Tank_BaseWalkingToIdle
SpecialState1 [NONE]
SpecialState2 [NONE]
AlmostBuilt [NONE]
Built [NONE]
Landing [NONE]
LiftOff [NONE]
IsWorking [NONE]
WorkingToIdle [NONE]
WarpIn [NONE]
Unused3 [NONE]
StarEditInit SSiegeTank_Tank_BaseStarEditInit
.headerend
# ----------------------------------------------------------------------------- #

SSiegeTank_Tank_BaseStarEditInit:
setfldirect 12
imgoluselo 254 2 0 # SiegeTankSeigeTurret (terran\stankt.grp)
SSiegeTank_Tank_BaseInit:
wait 1
imgul 255 3 1 # SiegeTankTankShad (terran\ttaShad.grp)
setfldirect 12
playsnd 319 # Terran\TANK\TTaTra01.WAV
SSiegeTank_Tank_BaseWalkingToIdle:
playfram 0x44 # frame set 0

SSiegeTank_Tank_BaseLocal04:
waitrand 63 75
randcondjmp 25 SSiegeTank_Tank_BaseLocal00
randcondjmp 128 SSiegeTank_Tank_BaseLocal03
goto SSiegeTank_Tank_BaseLocal04

SSiegeTank_Tank_BaseLocal00:
playfram 0x00 # frame set 0
wait 1
playfram 0x11 # frame set 1
wait 1
playfram 0x22 # frame set 2
randcondjmp 192 SSiegeTank_Tank_BaseLocal01
turnccwise 2
wait 3
turnccwise 2
wait 3
turnccwise 2
wait 3
turnccwise 2
wait 3
turnccwise 2
wait 3
wait 6
turncwise 2
wait 3
turncwise 2
wait 3
turncwise 2
wait 3
turncwise 2
wait 3
turncwise 2
wait 3
wait 6
turnccwise 2
wait 3
turnccwise 2
wait 3
turnccwise 2
wait 3
goto SSiegeTank_Tank_BaseLocal02

SSiegeTank_Tank_BaseLocal03:
playfram 0x55 # frame set 5
wait 1
playfram 0x66 # frame set 6
wait 1
turnrand 3
wait 1
playfram 0x55 # frame set 5
wait 1
goto SSiegeTank_Tank_BaseWalkingToIdle

SSiegeTank_Tank_BaseLocal01:
wait 13
SSiegeTank_Tank_BaseLocal02:
playfram 0x11 # frame set 1
wait 1
playfram 0x00 # frame set 0
wait 1
goto SSiegeTank_Tank_BaseWalkingToIdle



SSiegeTank_Tank_BaseDeath:
playsndbtwn 276 277 # Terran\MARINE\TMaDth00.WAV, Terran\MARINE\TMaDth01.WAV
setfldirect 0
playfram 0xdd # frame set 13
wait 2
playfram 0xde # frame set 13
wait 2
playfram 0xdf # frame set 13
wait 2
playfram 0xe0 # frame set 13
wait 2
playfram 0xe1 # frame set 13
wait 2
playfram 0xe2 # frame set 13
wait 2
playfram 0xe3 # frame set 13
wait 2
playfram 0xe4 # frame set 13
wait 2
lowsprul 236 0 0 # MarineDeath (terran\tmaDeath.grp)
wait 1
end

SSiegeTank_Tank_BaseGndAttkInit:
playfram 0x00 # frame set 0
wait 1
playfram 0x11 # frame set 1
wait 1
playfram 0x22 # frame set 2
SSiegeTank_Tank_BaseGndAttkRpt:
wait 1
nobrkcodestart
playsnd 69 # Bullet\TMaFir00.wav
attackwith 1
playfram 0x33 # frame set 3
wait 1
playfram 0x22 # frame set 2
wait 1
playfram 0x33 # frame set 3
wait 1
playfram 0x22 # frame set 2
wait 1
playfram 0x33 # frame set 3
wait 1
playfram 0x22 # frame set 2
wait 1
nobrkcodeend
gotorepeatattk
ignorerest
SSiegeTank_Tank_BaseGndAttkToIdle:
playfram 0x11 # frame set 1
wait 1
playfram 0x00 # frame set 0
wait 1
goto SSiegeTank_Tank_BaseWalkingToIdle

SSiegeTank_Tank_BaseWalking:
move 4
wait 1
playfram 0x55 # frame set 5
move 4
wait 1
playfram 0x66 # frame set 6
move 4
wait 1
playfram 0x77 # frame set 7
move 4
wait 1
playfram 0x88 # frame set 8
move 4
wait 1
playfram 0x99 # frame set 9
move 4
wait 1
playfram 0xaa # frame set 10
move 4
wait 1
playfram 0xbb # frame set 11
move 4
wait 1
playfram 0xcc # frame set 12
move 4
wait 1
playfram 0x44 # frame set 4
goto SSiegeTank_Tank_BaseWalking




None.

Jan 7 2009, 4:30 am modmaster50 Post #28



Then Angle Lock must have also done something else different. I do also notice a marine (which ur trying to imitate) has a turn radius of 40. That seems insignificant though. As long as the walking iscript isnt calling the wrong frames (shouldnt be cause its copied directly from marine and ur grp has same frames as marine), Id say its the turret getting desynced. Exactly how? Im not quite sure.



None.

Jan 7 2009, 4:32 am RoryFenrir Post #29



well this keeps getting better and better... so i have to exes right now, my main, and my tank test. The main allows the marines to seige, so i tried making unit, flingy, image dats the same as the test to allow for weapons and movement. My main mod crashes when i use the old dats, but when i use the dats from tank test, i can now move the seige base, but i cant change modes any more. When i click mode both jsut freeze in their current state.

Im going to try to isolate which dat is causing problems....



None.

Jan 7 2009, 5:06 am RoryFenrir Post #30



sorry to double post, i know i can edit but i want to try to finish this because we are really close and i want to update with new info:

Okay, i got both tanks to move, attack, and die fine. My only problem is now is that i cant switch modes. When i click mode switch they just freeze. From tank to seige, it switches units but it doesnt let me move it or attack with it (It plays the frames for change over and makes the sound). From seige to tank the button stays white, and then it jsut stays in seige mode and freezes completely (doest make sound).

My original mod the mode switch worked, but it wouldnt move so i synced my test mod with the original. I noticed 3 main differences.
-In my original, i did not have the "use medium overlay" box checked, but i checked to see if it mattered if you have it checked or unchecked and it does not.
-In my original i did not have links to lol files for the turret overlays (the overlays when they fire, not the turrets themsleves) but that doesnt matter because the turrets dont fire anyway...
-And last but not least (well maybe) i had the turn radius for the tank and the siege base for 40 in my original, but it doesnt matter if its 40 or 13....

i have 4 tank enteries in flingy.dat at icsript right now.

Im thinking my problem must be in iscript, i might have overwriten something in seige base, but its late and im tired so im turning in for the night...
Could this possibly be a firegraft problem? I dont think it would be because all ive modded for tanks is giving move, patrol, and hold to both.



None.

Jan 7 2009, 12:38 pm Angle Lock Post #31



by looking at your iscript rory, i finally found the problem regarding transition....

you don't even have transition for your stank.grp!!!

Since it's too early in the day I am not going to dig the thing out...

If that's your iscript, I will copy it, and then edit it, and send it to you.. after school @_@



None.

Jan 7 2009, 10:15 pm Angle Lock Post #32



Add this into your siege tank's tank mode iscript as the specialstate2, this is the reverse transition, on the very last part, instead of Goliath_base_local00gg, change it to Link it to the Local00 in YOUR OWN siege mode base's iscript:
Quote
SiegeTank_Siege_BaseSpecialState2:
wait 38
playsnd 319 # Terran\TANK\TTaTra01.WAV
playfram 4
wait 5
playfram 3
wait 5
playfram 2
wait 5
playfram 1
wait 5
playfram 0
wait 5
playsnd 317 # Terran\TANK\TTaDth00.WAV
sigorder 1
goto Goliath_Base_Local00gg

and, insert this part under the initiating scripts (right before the goto statement in the intiating script), this is the transition of the siege tank to siege mode:

Quote
wait 1
playsnd 319 # Terran\TANK\TTaTra01.WAV
playfram 0
wait 5
playfram 1
wait 5
playfram 2
wait 5
playfram 3
wait 5
playfram 4
wait 5
playfram 5
wait 38
sigorder 1

and I think you are ready to go!

Don't forget to buy me some candies for my hard work :)



None.

Jan 8 2009, 12:00 am RoryFenrir Post #33



alright sweet thanks alot :)

The transition from tank to seige works fine now, but about half the time the transition from seige to tank stops and the icon stays white. when this happens the locals keep running (randomly turning everyonce in a while) but you cant move or attack. I dont know exactly what causes this... could it have something to do with firegraft? I checked it out quick and didnt see anything with siege mode that would effect this.

If its an iscript problem then it would be in the special state 2, so here is what i have for this. (I changed the waits)
Quote
SiegeTank_Siege_BaseSpecialState2:
setfldirect 12
playsnd 319 # Terran\TANK\TTaTra01.WAV
playfram 0x00
wait 1
playfram 0x11
wait 1
playfram 0x22
wait 1
playfram 0x11
wait 1
playfram 0x00
wait 1
#playsnd 317 # Terran\TANK\TTaDth00.WAV
sigorder 1
goto SSiegeTank_Tank_BaseLocal00

I dont know whats going on with this but it does the freeze thing half the time. Everything else works and its pretty cool, i made the transition so that the marine lifts the riffle each time it switches. One beef i though is that with "setfldirect" it sets a certain frame, ideally i would like to keep the current frame so it doesnt always face anew dirrection but if thats not possible its not that big of a deal.



None.

Jan 8 2009, 1:26 am Angle Lock Post #34



Same problem with my vikings...

It freezes a lot of times...

I am 99% sure it's in iscript... but don't know what caused it...



None.

Jan 8 2009, 3:55 am RoryFenrir Post #35



maybe we should try a nobreakcode thing.... Who is really good at iscript on sen?



None.

Jan 8 2009, 4:23 am ForTheSwarm Post #36



Nobreak is easy. Put one at the beginning and put nobreakcodeend at the end.



None.

Jan 8 2009, 5:05 am RoryFenrir Post #37



oh man, the rabit hole only gets deeper. So of course the nobreakcode doesnt work, and there i am testing to see how fast the tanks freeze up and i try duke, and sure enough, it doesnt freeze ever. This proves it is NOT an icscript problem but a datedit problem. But of course duke cant move (or attack but i dont think attack will make any difference) in seige mode.

So forget when i asked for good iscripters, we now need to see if its posible to have tanks bable to move and attack, and not freeze. Ill work on it more tomorrow.



None.

Jan 8 2009, 5:39 am modmaster50 Post #38



I wonder if it would be a better idea to try the firegraft seige mode exe edits. If you turn off Exe Edit Li (Is it supposed to be link? Cause my comp cuts off GUIs, so I can never tell what it really says), you can change what unit seiges into what. Try using this instead of replacing the tank. Maybe it gets rid of the turret problem. But...Is this one of the broken exe edits?



None.

Jan 8 2009, 5:47 am RoryFenrir Post #39



well right now i know that there is something in datedit that makes tank able to move and fire, and there is something that makes it not able to seige correctly.

Im going to test out all the things to try to narrow down the problem and to see if its possible for both to work.
-Add weapons to both tanks
-Change AI actions for turrets and tanks
-Take away attack boxes for turrets and give to tanks
-Take away heroness for duke

it has to be one of these, these are all the changed or differenses in unit.dat. Everything else is dynamic between duke and regular tank so it has to be unit.dat.



None.

Jan 8 2009, 10:05 pm Angle Lock Post #40



I tend to disagree with you rory, I still think the problem resides within iscript...

This is like the only bug that I have on my viking, so I would surely appreciate someone eliminating it...



None.

Options
Pages: < 1 2 3 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:02 am]
Ultraviolet -- I'm gonna send inf to have sex with their moms
[03:02 am]
Ultraviolet -- fuck those motherfuckers
[11:02 pm]
NudeRaider -- PSA: ASUS apparently decided their RMA department needs to "become profitable" and for a while now outright tries to scam customers. They were called out on it a year ago, promised to change, but didn't. https://www.youtube.com/watch?v=7pMrssIrKcY so my recommendation: Stop buying ASUS, and if you already have and need something RMA'd, make sure to not let them bully you into paying.
[03:08 pm]
Oh_Man -- example of wat u mean?
[2024-5-15. : 5:59 am]
NudeRaider -- *is
[2024-5-15. : 5:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[2024-5-14. : 10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
Please log in to shout.


Members Online: 6madisone8922eb5, 6adrianc373te4, 4claudiac473eg5