Jump to content
Matthewsaaan

New Unit causing Error

Recommended Posts

So, I've decided I want to entre the exciting world of modding, and to start off I thought I'd have a bash at adding a new unit to Command and Conquer: Red Alert 2 using TibEd. This is the first time I've ever added a new SHP to the game and I don't have the skills to make one (yet), so I went online and found this handsome flame thrower chappy...

 

http://yrarg.cncguild.net/index.php?page=shps/shpsi1

 

...this guy came with all the code and camios that are needed, this should have made my job allot easier and help me familiarise myself with the codes used. I've gotten him working in TibEd, the art is all set up and then connected to the unit, camios are where they should be. But an error keeps popping up in game when I try and build him and it all crashes. His camio isn't there either, although there's the missing camio image where it should be. All the SHPs are in a MIX file called "expand11" and I put it in the RA2 directory. Does anyone have any idea how to fix this problem I have?

Share this post


Link to post

Did you add a new entry to the art file? That's very important as if you do not have a reference to the actual art, the game will crash. The other cause for a unit crashing that quickly is a bad weapon, or warhead, reference. But since you said the cameo was missing, just add an art entry (and sequence since I know Chrono Loony wrote one for it) and it should work.

Share this post


Link to post

Thanks Destiny. I already had an entry for the art, although not one for the sequence, but both are there now as he provided. I had also tried to make a new weapon for it so I changed that just to the conscripts gun (to find out if that's the problem). I ran the game and, although it no longer crashes, the camio still isn't appearing in the side bar and when built you can’t see the unit but it can be selected individually (but not at part of a group). Any other ideas?

Share this post


Link to post

Perhaps you should insert the codes directly into rulesmd.ini and artmd.ini rather than use TibEd. That way, at least you know if something isn't working, it's your own fault.

TibEd isn't perfect and is sometimes inclined to cause issues.

Share this post


Link to post

I'm going to be 100% honest, I'm not sure how you edit the rules.ini and art.ini (I'm using RA2) directly, other wise I’d probably have done that anyway. They're in a MIX file, I have the XCC mixer and such but how do you put them back where you got them from, or can you just leave them stand alone in the RA2 directory and RA2 will look at them there?

Share this post


Link to post
(I'm using RA2)

I saw that, I don't know why I forgot it while typing... :doh: (I'm a YR modder myself)

 

Editing the ini's is fairly easy, even though it may look pretty confusing at first glance. Just open them with WordPad, change stuff, and save (You'll want a backup default copy of them in case you want to revert your changes later however).

 

Normally, I do not download other people's work, but I did grab the Flamethrower to see what it is you are dealing with. I see that there are no rules for him, I assume you wrote them yourself then?

Before I make any more assumptions, post your rules code for your unit here.

Share this post


Link to post

[FTHROW]

UIName=Name:FTHROW

Name=Flame Thrower

Category=Soldier

Primary=M1Carbine

Occupier=yes ; I can Occupy UC buildings

Prerequisite=NAHAND

CrushSound=InfantrySquish

Strength=135

Armor=plate

TechLevel=3

Pip=white

Sight=5

Speed=4

Owner=Russians,Confederation,Africans,Arabs

Cost=400

Soylent=20

Points=5

IsSelectableCombatant=yes

VoiceSelect=ConscriptSelect

VoiceMove=ConscriptMove

VoiceAttack=ConscriptAttackCommand

VoiceFeedback=ConscriptFear

VoiceSpecialAttack=ConscriptMove

DieSound=ConscriptDie

Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}

PhysicalSize=1

MovementZone=Infantry

;MovementZone=InfantryDestroyer ;GEF wow!!! copy paste bug from the original Disk Thrower!

ThreatPosed=5 ; This value MUST be 0 for all building addons

VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER

EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF

ImmuneToVeins=yes

Size=1

ElitePrimary=M1CarbineE

IFVMode=2

AllowedToStartInMultiplayer=no

 

 

I just took the code from the conscript and edited it as needed (or at least as best I could tell was needed). I'm going to have a go at making a new weapon when I get this working. I've removed the changes that I made in TibEd and did them again directly in the .INI files. But I'm having the same problem. When I hover over where the cameo should be in game I get the messege "MISSING:'Name:FTHROW'$400"

Share this post


Link to post

You need Image=FTHROW

 

The name problem is because Name:FTHROW doesn't exist, you need to add it in the CSF file.

Share this post


Link to post

I added "Image=FTHROW" to my rules.ini but the problem's still there. And again, being totaly new to this kind of thing, I don't actualy know where or what the CSF file is.

Share this post


Link to post

You can download ra2stredit to edit the CSF file. Remember to open ra2.csf from the RA2 folder and save it there as well (putting a default copy of the thing somewhere also wouldn't hurt).

 

I think TibEd is supposed to do it automactically, but the infantry also needs an entry in the [infantryTypes] list...

Share this post


Link to post

I edited the CSF using XCC String Table Editor in the end. It got rid of the messege "MISSING:'Name:FTHROW'$400" but the units graphics still aren't there. By the way, thanks for all the help so far Nmenth, I'd've had no idea how to get this far on my own.

Share this post


Link to post

Yeah it does, I put all the SHPs in a MIX file titled "expand11" in the RA2 directory and I also tried putting that mix file into the RA2 mix file. Neither worked.

Edited by Matthewsaaan

Share this post


Link to post

My art code is...

 

[FTHROW] ; Flamethrower

Cameo=flamicon

AltCameo=flamico

Sequence=FlameThrowerSequence

Crawls=yes

Remapable=yes

FireUp=2

PrimaryFireFLH=100,-25,135

SecondaryFireFLH=100,-25,135

Image=fthrow

 

...and the sequence code is...

 

[FlakSequence]

Ready=0,1,1

Guard=0,1,1

Prone=165,1,6

Walk=8,6,6

FireUp=116,6,6

Down=213,2,2

Crawl=165,6,6

Up=229,2,2

FireProne=245,6,6

Idle1=56,15,0,W

Idle2=71,14,0,E

Die1=86,15,0

Die2=101,15,0

Die3=0,1,1

Die4=0,1,1

Die5=0,1,1

Cheer=293,8,0,S

Paradrop=164,1,0

Panic=8,6,6

Share this post


Link to post

I see a problem already. You used the wrong name for the sequence. It should be [FlameThrowerSequence] instead of [FlakSequence]. I think the Flak Trooper uses the generic one anyway so it's not a huge deal but I would correct that first off.

 

And you should always use capitals when you reference SHPs and voxels.

 

So... Cameo=FLAMICON instead of flamicon.

 

Also... Image does not work in art for anything but animations.

Share this post


Link to post
You used the wrong name for the sequence. It should be [FlameThrowerSequence] instead of [FlakSequence].

oops, I just copied the wrong sequnce code, this is what Im using...

 

[FlameThrowerSequence]

Ready=0,1,1

Guard=0,1,1

Prone=86,1,6

Walk=8,6,6

FireUp=164,10,10

Down=322,2,2

Crawl=86,6,6

Up=338,2,2

FireProne=244,10,10

Idle1=56,15,0,S

Idle2=71,15,0,E

Die1=134,15,0

Die2=149,15,0

Die3=0,1,1

Die4=0,1,1

Die5=0,1,1

;Cheer=56,15,0,W

Cheer=355,8,0,E

Paradrop=354,1,0

Panic=8,6,6

 

...I've also changed the code so it now looks like this...

 

[FTHROW] ; Flamethrower

Cameo=FLAMICON

AltCameo=FLAMICO

Sequence=FlameThrowerSequence

Crawls=yes

Remapable=yes

FireUp=2

PrimaryFireFLH=100,-25,135

SecondaryFireFLH=100,-25,135

 

...my SHP files were all in the lower case, because that's how they were when I downloaded them, so I changed them to the upper case aswell. Even so the graphics still aren't loading in game.

Share this post


Link to post

The file name for your graphics doesn't matter. It can be in lower case, that's not a big deal. It's the name in the [bRACKETS] and any time you reference a graphic that makes a difference... usually.

Share this post


Link to post

unfortunatly it's still not working, so unless you can think of anything else it looks like we're stumpped...

Share this post


Link to post

Sometimes all it takes is removing everything, saving and starting over from scratch. I've run into this before and it's irritating.

Share this post


Link to post

I uninstalled the game and then reinstalled it so I'd have a fresh start, I did everything by editing .INI files this time and made all the little changes and suggestions you guys have made to me here. And it's ALMOST working properly, unfortunately the unit cannot fire and there aren't any movement animations etc. I'm going to try and fix this on my own as I would imagine that it’s something to do with the sequencing code. Thanks for all the help guys and hopefully if I keep at it and get used to all this I may be able to help some one else out in the future.

 

Edit: I got all the animations working now, I hadn't copied the titled part of the sequencing code so it thought it was still part of the flak troopers code. Thanks again.

Edited by Matthewsaaan

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×