Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 7:08 pm
All times are UTC + 0
Sniper: Fireing when Prone only EDIT: Crashes, .MIX attached
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Gribbel
Vehicle Driver


Joined: 06 Jul 2013

PostPosted: Sun Jul 14, 2013 11:54 am    Post subject:  Sniper: Fireing when Prone only EDIT: Crashes, .MIX attached Reply with quote  Mark this post and the followings unread

So i´m trying to create a sniper who only fires when prone.

I made a working Slavick/Elite Cadre Unit copy and tried to modify the Art.INI "Infantry Sequences" to make it fire only when prone.

My idea was simple, Copy an existing Sequence,modify and rename it and add the new Sequence under the Sequence=XXX path that Infantry Units Have, example: [E1Sequence].

Unfortunaetly, that doesnt work.

TS/FS always uses E1Sequence for infantry, no matter what i type in ART.INI.

If i modify the E1Sequence to make units firing only prone it works fine, but i only want ONE unit to do so.

Ideas how make it possible?

Last edited by Gribbel on Mon Jul 15, 2013 5:44 pm; edited 1 time in total

Back to top
View user's profile Send private message
Zero18
Commander


Joined: 10 Dec 2012
Location: I'm too busy conquering the world!

PostPosted: Sun Jul 14, 2013 12:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

AFAIK, this can't be done. But you can change the infantry sequence around in the INI. Or in the sniper SHP file and move the standing firing to prone firing.

Though it will not throw them into prone, which requires them to be under for to actually go prone (which will mean your sniper will stand if you switch the sequence in the SHP file)

_________________
Mod Leader and founder of World Domination


Back to top
View user's profile Send private message
Gribbel
Vehicle Driver


Joined: 06 Jul 2013

PostPosted: Sun Jul 14, 2013 12:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Too bad...even the unused WeatSequence from the Chemspray Infantry cannot be modified...

Back to top
View user's profile Send private message
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Sun Jul 14, 2013 2:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't think the sequences are hardcoded. That would be ridiculous and stupid. Confused Maybe something went wrong. Check your codes again.

I have a suggestion but this is just a wild guess. Open the infantry's sequence and change FireUp to -1. Theoretically, that would disable it from firing when standing up. SuperJoe did something similar for not firing when prone. And I assume it needs to be in prome frame first before attacking.

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
m7
Commander


Joined: 17 Apr 2009

PostPosted: Sun Jul 14, 2013 3:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

[E1] is a rather precarious thing in TS, much like a few other units. TS is a massive hack and there are plenty of massive hard-coded elements.

For what you want to accomplish, create a new art entry for the infantry, give it a specific new sequence, and that should solve your problems. TS is not hardcoded to use specific sequences, as is proven in various mods released for the old engine.

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sun Jul 14, 2013 3:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's quite simple. First copy the entire sequence which is currently used by your unit, rename its ID to something unique; let's go with SniperSequence for now. Then replace the values after FireUp= with the values that are currently entered after FireProne= and you're done.

Don't forget to actually assign this new sequence to your infantry however, for example:
Code:
[SLAV]
Sequence=SniperSequence


Take in mind that if you changed this sequence for [SLAV] in Art.ini, any infantry in Rules.ini that uses Image=SLAV (or [SLAV] as its ID with no Image= key present) will then use this new sequence.
The sequence will not be used if your infantry uses [SLAV] as its ID but uses a different image (for example Image=UMAGON).


Edit:
@m7: from what I can tell he's not editing [E1] to begin with, so that shouldn't be the issue.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sun Jul 14, 2013 4:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

There are transition frames to and from prone to standing which will require touching up. Represented by Up and Down entries.

ProneDamage logic won't be applicable on FireUp part in this case.

Back to top
View user's profile Send private message
Gribbel
Vehicle Driver


Joined: 06 Jul 2013

PostPosted: Sun Jul 14, 2013 4:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
It's quite simple. First copy the entire sequence which is currently used by your unit, rename its ID to something unique; let's go with SniperSequence for now. Then replace the values after FireUp= with the values that are currently entered after FireProne= and you're done.

Don't forget to actually assign this new sequence to your infantry however, for example:


AFAIK i did that. AFAIK.

Ok step by step:

I Have a new Unit, ID=[SNIPER] in Rules.INI AND ART.INI.
Its Basicallly a copy of [SLAV] and works fine ingame.

In ART.INI i create a new Infantry Sequence. I just Copy E1Sequence, give it a new ID like:

Quote:

[ProneSequence]
Ready=0,1,1
Guard=0,1,1
Prone=86,1,6
FireUp=212,6,6
Walk=8,6,6
Down=260,2,2
Crawl=86,6,6
Up=276,2,2
FireProne=212,6,6
Idle1=71,14,0,E ;56,15,0,W
Idle2=71,14,0,E
Die1=134,15,0
Die2=149,15,0
Die3=0,1,1
Die4=0,1,1
Die5=0,1,1


FireUP and FireProne have the identical code and yes, this works but only with the ORINAL E1Sequence. NOT with the Copy.

Then i go to my Sniper Unit in ART.INI and add the new Sequence
Quote:

[SNIPER]
Sequence=ProneSequence
Cameo=WEATICON
Crawls=yes
Remapable=yes
FireUp=2
PrimaryFireFLH=100,0,100


Thats should it be right? But that doesnt work.

Back to top
View user's profile Send private message
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Sun Jul 14, 2013 5:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

What doesn't work? Firing when prone only?

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
Gribbel
Vehicle Driver


Joined: 06 Jul 2013

PostPosted: Sun Jul 14, 2013 5:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

^^Yep. Seems that TS only accepts the existing Sequences, no additions.

Which is weird.

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sun Jul 14, 2013 5:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

I know for a fact that newly added Sequences work perfectly fine; I only have very few sequences that use the original IDs left in my mod after all I'm surely not just imagining that all infantry animations are functioning exactly the way they should Razz

How did you get your [SNIPER] infantry to look like SLAV? Did you actually make a copy of slav.shp or did you enter Image=SLAV under the sniper's code in Rules.ini? I'm going to guess that it's the latter and as I explained before, adding Image= to an infantry in Rules.ini will make that infantry use the sequence of the infantry image you referred to; SLAV in this case (and as you know, SLAV uses Sequence=E1Sequence).

So if you are indeed using Image=SLAV in Rules.ini, you'll either have to change the Sequence that's specified under [SLAV] in Art.ini (this will then obviously also make the normal Slavick/Elite Cadre infantry crouch whenever they fire) or make a copy of slav.shp, rename it to sniper.shp, insert it into ecache02.mix and then use Image=SNIPER instead (or indeed leave out that key if the ID is the same as the image).

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sun Jul 14, 2013 5:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

For what you are doing, additionally do these:

You have to extract slav.shp from conquer.mix in tibsun.mix. Then rename it to sniper.shp and put it in say ecache90.mix and place the mix file in the base TS folder.

In rules.ini, under [SNIPER] don't give Image=SLAV. In art.ini, keep new entries above [Movies] section.

Back to top
View user's profile Send private message
Gribbel
Vehicle Driver


Joined: 06 Jul 2013

PostPosted: Sun Jul 14, 2013 6:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ah thanks that should work i will try tomorrow

Back to top
View user's profile Send private message
Gribbel
Vehicle Driver


Joined: 06 Jul 2013

PostPosted: Mon Jul 15, 2013 5:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

works fine now Rolling Eyes  thanks for helping me Smile



ecache90.mix
 Description:

Download
 Filename:  ecache90.mix
 Filesize:  266.37 KB
 Downloaded:  45 Time(s)


Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Mon Jul 15, 2013 7:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mix file is OK. Place it in TS folder.
If still not working, show your rules.ini entries. Also art.ini entries if changed.

Back to top
View user's profile Send private message
Gribbel
Vehicle Driver


Joined: 06 Jul 2013

PostPosted: Mon Jul 15, 2013 7:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

it works fine now, i made a mistake.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1721s ][ Queries: 13 (0.0094s) ][ Debug on ]