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 Sat Apr 20, 2024 1:05 am
All times are UTC + 0
Stupid code...
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [20 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Dalamar_TheDark
Rocket Cyborg


Joined: 03 Dec 2004
Location: Ohio

PostPosted: Fri Dec 09, 2005 1:26 pm    Post subject:  Stupid code... Reply with quote  Mark this post and the followings unread

I've worked on this code for three hours just to get it to not crash the game. Now, it isn't buildable. What the hell's wrong with it?

; Lasher Light Tank
[LTNK]
Accelerates=false
AllowedToStartInMultiplayer=yes
Armor=light
BuildTimeMultiplier=1.5
Cost=800
Category=AFV
Crewed=yes
CrateGoodie=yes
Crushable=yes
Crusher=yes
CrushSound=TankCrush
DebrisTypes=LTNK,LTNKTUR
DebrisMaximums=1
DamageParticleSystems=SparkSys,SmallGreySSys
DieSound=GenVehicleDie
DamageSmokeOffset=100, 100, 275
ElitePrimary=90mmE
EliteAbilities=FASTER,FIREPOWER,ROF,SIGHT,SELF_HEAL
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
Image=LTNK
IsSelectableCombatant=yes
IsTilter=yes
LegalTarget=yes
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MaxDebris=1
MovementZone=Destroyer
MovingFire=no
MoveSound=LasherTankMoveStart
Name=Lasher Light Tank
OmniFire=yes
Owner=Russians,Confederation,Africans,Arabs
OmniCrusher=yes
Points=25
Prerequisite=NAWEAP
Primary=90mm
ROT=5
RequiredHouses=Confederation
Soylent=800
Sensors=yes
Sight=8
Size=2
Strength=670
Speed=10
TooBigToFitUnderBridge=true
TargetLaser=yes
Trainable=yes
Turret=yes
TechLevel=2
ThreatPosed=40 ; This value MUST be 0 for all building addons
UIName=Name:Lasher
VeternAbilities=FASTER,ROF,SIGHT,GUARD_AREA
VoiceSelect=LasherTankSelect
VoiceMove=LasherTankMove
VoiceAttack=LasherTankAttackCommand
Weight=2.5
ZFudgeColumn=8
ZFudgeTunnel=13

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tratos
General


Joined: 01 Jan 2003

PostPosted: Fri Dec 09, 2005 1:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

When does the game crash? After the load screen? When you build the unit?

Back to top
View user's profile Send private message Send e-mail
Oshog
General


Joined: 02 Sep 2005
Location: Sofia, Bulgaria

PostPosted: Fri Dec 09, 2005 2:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

I can't see the stupidity.Can you point it out,pls?

Back to top
View user's profile Send private message Send e-mail
Dalamar_TheDark
Rocket Cyborg


Joined: 03 Dec 2004
Location: Ohio

PostPosted: Fri Dec 09, 2005 11:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

The game crashed after the load screen. The interface came up and then my computer went to the desktop. Now, the unit doesn't build at all.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rattuskid
Sergeant


Joined: 01 Sep 2003
Location: Jersey,new

PostPosted: Sat Dec 10, 2005 1:36 am    Post subject: Reply with quote  Mark this post and the followings unread

A few things:

-You do realize with all the soviet houses definded as owners, and it being available at the start, all the soviet factions will get one? Even of you can only BUILD it by the Cubans.

-Are LTNK and LTNKTUR defined as new debris types? You have to specify them under

; ******* Voxel Debris types *******

-Why would a tank be crushable? Crushable=yes is for infantry, meaning a normal tank can squish them. Are you looking for OmniCrushResistant=? Why would you have the tank both Crushable AND an Omnicrusher?

-MovingFire= is not a valid tag. You want MobileFire= (yes,no). Unless you want PreventAttackMove=.

I'm sure there are other errors, but try fixing those first. Are you using Tibed or something?  Notepad works so much better.

_________________

Back to top
View user's profile Send private message Skype Account AIM Address
Dalamar_TheDark
Rocket Cyborg


Joined: 03 Dec 2004
Location: Ohio

PostPosted: Sat Dec 10, 2005 3:52 am    Post subject: Reply with quote  Mark this post and the followings unread

-Didn't know that. I'll fix that later. Doesn't pertain to the subject.

-Of course. That wouldn't prevent buildability anyway.

-That still wouldn't prevent it from showing up in the build list.

-MovingFire was on the list of commands I have. I'll check again.

I am using notepad, you twit. I made this code from scratch, and I alphabetized it to make sure I hadn't repeated tags. don't mistake me for a retard.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
John Galt
Commander


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Sat Dec 10, 2005 7:57 am    Post subject: Reply with quote  Mark this post and the followings unread

No need for the name calling, you know.

As far as I know, the only things that can prevent a unit from becoming a valid build option are
- leaving it out of the [VehicleTypes] list and not mentioning it in any [General] tags that refer to VehicleTypes. (Yes, if you say "BaseUnit=AMCV,SMCV" there's no need to include them in the [VehicleTypes], the game will load them anyway, though adding them to the end of the [VehicleTypes], thus increasing the chance for a 100 unit bug. That doesn't pertain to the subject, but is rarely known.)
- Setting a prerequisite to a building that the players can never acquire / that doesn't exist in the game.
- Not setting a -1 < TechLevel < 11.
- fiddling with the owner houses.

Now I see that your unit doesn't do anything like that, so I can honestly say I can't see a reason for that behavior. Except for the ever so small possibility that you moved it off the [VehicleTypes] list somehow.

You didn't specify whether this is for RA2 or YR, and BuildTimeMultiplier=/OmniCrusher= don't exist in RA2...

Back to top
View user's profile Send private message Visit poster's website Skype Account
Tratos
General


Joined: 01 Jan 2003

PostPosted: Sat Dec 10, 2005 12:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Usually, the reason for a unit crashing the game as soon as it appears is an invalid warhead. Check that the warhead on your weapons (both of them) exists as is defined in the [warheads] list.

Back to top
View user's profile Send private message Send e-mail
Dalamar_TheDark
Rocket Cyborg


Joined: 03 Dec 2004
Location: Ohio

PostPosted: Sat Dec 10, 2005 4:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm sorry, Rattuskid. I was just mad because I thought you were insulting my coding skills.

I did get it fixed. There was a few instances where I left out e's because I was coding at 11 at night. This is for YR. Maybe all those little things prevented it, who knows? Anyway, now I am having problems with debris. The tank body doesn't go anywhere, it just slides along the ground. The turret is most spectacular, though. And also, sometimes I'll get too many turrets or bodies, or none at all, even though I have DebrisMaximums=1,1. I suspect I forget the s at the end now, but I doubt that's it.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
John Galt
Commander


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Sat Dec 10, 2005 4:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

DebrisMaximums doesn't work that way in YR, I've seen (and other confirmed this) that it simply sums all the numbers and drops their context, throwing a (0 <= actual amount <= sum of those entries) amount of completely random debris from DebrisTypes= .

As for the debris movement, that's controlled completely by their sections, and I don't think we can tell you what is the problem without seeing the actual code you used.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Rattuskid
Sergeant


Joined: 01 Sep 2003
Location: Jersey,new

PostPosted: Sat Dec 10, 2005 8:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

DCoder wrote:
(Yes, if you say "BaseUnit=AMCV,SMCV" there's no need to include them in the [VehicleTypes], the game will load them anyway, though adding them to the end of the [VehicleTypes], thus increasing the chance for a 100 unit bug. That doesn't pertain to the subject, but is rarely known.)


That's friggin' awesome DCoder.

Oh, and I'm sorry if I sounded rude, I'm just an INI junkie.   Smile

Are you sure you want DebrisMaximums=? According to DeeZire's INI guide (http://deezire.net should be under downloads), DebrisMaximums is related to some section or tag known as 'MetallicDebris'. I think MaxDebris is the only one that works on units.

_________________

Back to top
View user's profile Send private message Skype Account AIM Address
Dalamar_TheDark
Rocket Cyborg


Joined: 03 Dec 2004
Location: Ohio

PostPosted: Sat Dec 10, 2005 9:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
[LTNK]
Name=Flying Lasher body
Elasticity=0.0
MinAngularVelocity=170.0
MaxAngularVelocity=180.0
MinZVel=40.0
MaxZVel=50.0
MaxXYVel=8.0
ExpireAnim=TWLT036
Damage=30
DamageRadius=50
Duration=200
ShareBodyData=yes
Spawns=FireStream
ShareSource=LTNK
Warhead=SAFlame

[LTNKTUR]
Name=Lasher Tank Turret
ShareTurretData=yes
ShareSource=LTNK
Elasticity=0.0
MinAngularVelocity=300.0
MaxAngularVelocity=360.0
MinZVel=40.0
MaxZVel=50.0
MaxXYVel=8.0
Duration=110
ExpireAnim=TWLT036
Damage=30
DamageRadius=50
Warhead=TankOGas


I'm not used to RA2 coding, really. I started out in TS.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Sun Dec 11, 2005 12:24 am    Post subject: Reply with quote  Mark this post and the followings unread

don't use Spawns=FireStream

ShareSource=LTNK  does not work use image= and uh actually read smiffig tutorial on it

and the defining for 1 turret, 1 body is broken

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
John Galt
Commander


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Sun Dec 11, 2005 8:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Rattuskid wrote:
DCoder wrote:
(Yes, if you say "BaseUnit=AMCV,SMCV" there's no need to include them in the [VehicleTypes], the game will load them anyway, though adding them to the end of the [VehicleTypes], thus increasing the chance for a 100 unit bug. That doesn't pertain to the subject, but is rarely known.)


That's friggin' awesome DCoder.


Yeah, nice, it works with all referencing objects, hence why it loads warheads not included in [Warheads], but I prefer not to rely on it, cause it just increases the chances of the 100 unit bug. And you can't see the object's index in the array that way, which is quite necessary when coding AI or map triggers.

Speaking of object enumerating, westwood can't even do THAT right...


Dalamar, I remember copying the TIRE coding for my new debris, that worked pretty well and required very little tweaking. But, as AliG said, do read that tutorial, I do believe it's in the TS tutorial factory.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Sun Dec 11, 2005 11:57 am    Post subject: Reply with quote  Mark this post and the followings unread

also wtf r u giving yuri's lasher tank to the soviets with battle fortress crush o_O

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
Dalamar_TheDark
Rocket Cyborg


Joined: 03 Dec 2004
Location: Ohio

PostPosted: Sun Dec 11, 2005 4:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

I did read it, enough to make these. As for ShareSource= not working, then why does it work ingame? You must be mistaken. If you're using a voxel image for debris that is being used for a unit, you need to have Share(Body,Turret, or Barrel)Date=yes and ShareSource=(image name).  As for Spawns=FireStream, I know that it does nothing, and it doesn't matter. Since it throws a random number of debris from DebrisTypes, I'm only using the turret, which works fine.

As for why I have this unit, that's none of your concern. And if that's the only difference you can spot, then you should pay more attention.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Sun Dec 11, 2005 10:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

you use image= you retard otherwise it reads your [IDNAME] and you wouldn't be asking for help in the 1st place

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
Dalamar_TheDark
Rocket Cyborg


Joined: 03 Dec 2004
Location: Ohio

PostPosted: Sun Dec 11, 2005 10:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm no longer asking for help because I fixed the problem. The problem I was having was the body was only moving along the ground instead of flying into the air, not that the image wasn't appearing. And, since I don't have Image= in my tags, obviously ShareSource= and Share(Turret)(Body)(Barrel)Data= work.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Mon Dec 12, 2005 12:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

no cos if u don't use image= it just reads the [] so for instance [LTNK] has no Image= cos there is a voxel called LTNK already however [E1] needs Image=GI cos the art file has no [E1] entry

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
Vincent93
Commander


Joined: 07 May 2005
Location: Behind you!!!

PostPosted: Mon Dec 12, 2005 8:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

Allied General wrote:
no cos if u don't use image= it just reads the [] so for instance [LTNK] has no Image= cos there is a voxel called LTNK already however [E1] needs Image=GI cos the art file has no [E1] entry


Yeah Dalmar he's right

_________________


Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [20 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.1835s ][ Queries: 11 (0.0079s) ][ Debug on ]