PDA

View Full Version : If anyone is a modding newbie...


Tesla
03-29-2007, 01:52 PM
If anyone is a newbie at modding and has a question, I will be glad to help.

FlyingZ
03-29-2007, 03:51 PM
If anyone is a newbie at modding and has a question, I will be glad to help.
What are all the default ini values?

If I add this infantry:

[NewUnit]
Image=BlaBla ;added to art
Prerequisite=BARRACKS
Owner=Russians,Confederation,Africans,Arabs,YuriCountry,British,French,Germans,Americans,Alliance
TechLevel=1

What are the defaults values added on game load?

For example if no locomotor value is entered the game will default to {4A582747-9839-11d1-B709-00A024DDAFD1} the Chrono locomotor

No strength entry will default to 1

This will save us all from having to enter in tons of meaningless code like Insignificant=no or IsSelectableCombatant=yes

Tesla
03-29-2007, 04:51 PM
Go into the rules file with notepad and click Edit>Find and type:
; ******* Unit Statistics *******

Below these two lines it says which tags default to yes, no, or nothing. Tags which default to yes or no could (probably) be left out of the unit coding (though it is preferable not to do this) without crashing the game, but the ones that have no default (such as Armor, Cost, and Catagory) will cause an Internal Error if they are left out. These tags MUST be there, even if the value is 0 (for cost) or none (for Armor). (Category does not necessarily need to be there, but if it is not there, then the AI will be screwed if it tries to build it) Prerequisite must also be there or you will not be able to build the unit, and Speed must be there or the unit will not be able to move.
It would be kind of hard to give you a complete list. Just experiment with various things and look at other units' coding to give you an idea on how to create your own unit.

The unit you have given me the code for would not be able to be built, since it has no TechLevel, and/or would probably cause an internal error, since it has no cost, and even if it could be built it would not be able to move, since it has no speed and no locomotor.
The easiest way to create a new unit is to clone (that is, copy and paste the code of) another unit and alter the image, speed, strength, weapons, voices, prerequisite and whatever.

Here is a copy-pasted version of the Lasher Tank:

; Lasher Light Tank
; Light Tank
[SUPTNK]
UIName=Name:SuperTank
Name=Super Tank
Image=LTNK
Prerequisite=NAWEAP
Primary=CoilBolt
Strength=600 ;200
Category=AFV
Armor=heavy
Turret=yes
IsTilter=yes
;TargetLaser=yes
TooBigToFitUnderBridge=true
TechLevel=2
Sight=12 ;8;6
Speed=10 ;7;8
CrateGoodie=no
Crusher=yes
Owner=Russians,Africans,Confederation,Arabs
Cost=700;600
Soylent=700
Points=25
ROT=5
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=LasherTankSelect
VoiceMove=LasherTankMove
VoiceAttack=LasherTankAttackCommand
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=LasherTankMoveStart
CrushSound=TankCrush
Maxdebris=3
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Destroyer
ThreatPosed=40 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
DamageSmokeOffset=100, 100, 275
Weight=3.5
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ZFudgeColumn=8
ZFudgeTunnel=13
Size=3
OpportunityFire=yes
ElitePrimary=OPCoilBolt ;90mmE
BuildTimeMultiplier=1.5;Individual control of build time
AllowedToStartInMultiplayer=no

This would make an incredibly strong, fast tank with the Tesla Coil's lightning bolt initially and the overpowered tesla coil bolt when it is elite.

Fenring
03-29-2007, 06:29 PM
Defaults are usually zero or no. There are exceptions of course but those are few and far between. Besides, ModEnc (http://modenc.renegeadeprojects.com) is better at answering that than I am.

FlyingZ
03-29-2007, 07:14 PM
it says which tags default to yes, no

We don't need any of these listed unless we want to change the default

the ones that have no default (such as Armor, Cost, and Catagory) will cause an Internal Error

False, everything has a default

It would be kind of hard to give you a complete list.

Not that many left to list

The unit you have given me the code for would not be able to be built

False
However I was wrong about the cost. Cost will be free

The easiest way to create a new unit is to clone (that is, copy and paste the code of) another unit and alter the image, speed, strength, weapons, voices, prerequisite and whatever.

Precisely why I suggested making a list.

Your unit again with the unnecessary code in bold (That I can think of off hand)

1.19 KB without my comments

; Lasher Light Tank
; Light Tank
[SUPTNK]
UIName=Name:SuperTank
Name=Super Tank ;Optional
Image=LTNK
Prerequisite=NAWEAP
Primary=CoilBolt
Strength=600 ;200 ;ANYTHING with (;) is excluded
Category=AFV ;I believe this is obsolete
Armor=heavy
Turret=yes
IsTilter=yes ;Already is by default
;TargetLaser=yes ;Excluded
TooBigToFitUnderBridge=true ;I believe this is obsolete
TechLevel=2
Sight=12 ;8;6 ;Excluded
Speed=10 ;7;8 ;Excluded
CrateGoodie=no ;Already is by default
Crusher=yes
Owner=Russians,Africans,Confederation,Arabs
Cost=700;600
Soylent=700
Points=25
ROT=5
IsSelectableCombatant=yes ;I believe this is obsolete
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=LasherTankSelect
VoiceMove=LasherTankMove
VoiceAttack=LasherTankAttackCommand
VoiceFeedback= ;Um.... do I have to say it?
DieSound=GenVehicleDie
MoveSound=LasherTankMoveStart
CrushSound=TankCrush
Maxdebris=3
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Destroyer
ThreatPosed=40 ; This value MUST be 0 for all building addons ;Excluded
DamageParticleSystems=SparkSys,SmallGreySSys
DamageSmokeOffset=100, 100, 275
Weight=3.5
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false ;Already is by default IIRC
ZFudgeColumn=8
ZFudgeTunnel=13
Size=3
OpportunityFire=yes
ElitePrimary=OPCoilBolt ;90mmE ;Excluded
BuildTimeMultiplier=1.5;Individual control of build time ;Excluded
AllowedToStartInMultiplayer=no ;Already is by default

Here is the exact tank (951 bytes):

; Lasher Light Tank
; Light Tank
[SUPTNK]
UIName=Name:SuperTank
Image=LTNK
Prerequisite=NAWEAP
Primary=CoilBolt
Strength=600
Armor=heavy
Turret=yes
TechLevel=2
Sight=12
Speed=10
Crusher=yes
Owner=Russians,Africans,Confederation,Arabs
Cost=700
Soylent=700
Points=25
ROT=5
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=LasherTankSelect
VoiceMove=LasherTankMove
VoiceAttack=LasherTankAttackCommand
DieSound=GenVehicleDie
MoveSound=LasherTankMoveStart
CrushSound=TankCrush
Maxdebris=3
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Destroyer
ThreatPosed=40
DamageParticleSystems=SparkSys,SmallGreySSys
DamageSmokeOffset=100, 100, 275
Weight=3.5
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ZFudgeColumn=8
ZFudgeTunnel=13
Size=3
OpportunityFire=yes
ElitePrimary=OPCoilBolt
BuildTimeMultiplier=1.5
AllowedToStartInMultiplayer=no

275 bytes less for just one unit and the Lasher is mild compared to others.

Now heres is the thing:

In Rulesmd delete all instances of Insignificant=no and any other useless code and truncate all comments. We will have a vastly smaller (faster) file to deal with and we don't have to see posts with stupid things like ImmuneToPsionics=no


Defaults are usually zero or no. There are exceptions of course but those are few and far between. Besides, ModEnc (http://modenc.renegeadeprojects.com) is better at answering that than I am.
Firefox can't find the server at modenc.renegeadeprojects.com

http://www.modenc.renegadeprojects.com

Corsarus
03-29-2007, 11:17 PM
odd, the thread starter said noobs only and you all seem to know what you are talking about, so i have come to help by being a noob :D

first, does anyone know how to code a new superweapon that will be an exact copy of a previous one but will come from a different structure? I just need the superweapon code, i know all the rest.

second...does anyone know what the code peices in the locomotor mean? IE 4414 etc...

yay!! all done with my noobish questions!!!

Tesla
03-30-2007, 01:14 AM
odd, the thread starter said noobs only and you all seem to know what you are talking about, so i have come to help by being a noob :D

first, does anyone know how to code a new superweapon that will be an exact copy of a previous one but will come from a different structure? I just need the superweapon code, i know all the rest.

second...does anyone know what the code peices in the locomotor mean? IE 4414 etc...

yay!! all done with my noobish questions!!!

For your first question, you just put "Superweapon=whatever" onto your new building. (whatever can be replaced by any superweapon that is functional in Yuri's Revenge, unless you're using rock patch, which is a whole different story)

Secondly, I have no idea about the locomotor code, and I doubt that anybody really bothers figuring it out (although I could be wrong), and if you try to change just one part of the locomotor code, it would probably cause an IE.

And you, Mr. Z, I said if anybody is a NEWBIE at modding, then ask me questions. You seem to know what you are talking about (more than me about some things), so why did you bother asking me that question?

Fenring
03-30-2007, 10:20 AM
Category=AFV ;I believe this is obsolete
False. Category is used for sidebar placement.

CrateGoodie=no ;Already is by default
False. Defaults to yes.

IsSelectableCombatant=yes ;I believe this is obsolete
False. This determines whether or not you can select the unit.

AllowedToStartInMultiplayer=no ;Already is by default
False. Defaults to yes.

Firefox can't find the server at modenc.renegeadeprojects.com
http://www.modenc.renegadeprojects.com
Damn typoes. :|

FlyingZ
03-30-2007, 11:53 PM
Originally Posted by FlyingZ
Category=AFV ;I believe this is obsolete
False. Category is used for sidebar placement.
False. Defaults to yes.

For buildings yes but units? That’s news to me. No time to test at the moment.
From what I remember BuildCat=Combat places a building in the defence tab. The rest do what exactly Fenring?

Originally Posted by FlyingZ
CrateGoodie=no ;Already is by default

False. Defaults to yes.

Quote RULESMD
CrateGoodie = Can it appear out of a crate in multiplay (def=no)
It could be wrong I suppose.

Originally Posted by FlyingZ
IsSelectableCombatant=yes ;I believe this is obsolete

False. This determines whether or not you can select the unit.

NO
The hotkey P Selects all units with IsSelectableCombatant=yes so it does have a use. Default is no

IIRC Selectable=yes is what your thinking of and that to is useless.
Selectable=no could have a use for some things

Originally Posted by FlyingZ
AllowedToStartInMultiplayer=no ;Already is by default

False. Defaults to yes.

Yup, but it was from memory.


Damn typoes. :|
Happens to all of us ;)

And you, Mr. Z, I said if anybody is a NEWBIE at modding, then ask me questions. You seem to know what you are talking about (more than me about some things), so why did you bother asking me that question?
This is something easy you could do to benefit everyone. Fenring, many others, and myself know all this but we could still benefit from a clean copy of rules as much as the noobs.

BTW this forum crashes firefox. I had to use ie to post. Anyone else?

Corsarus
03-31-2007, 12:40 AM
no, im fine using mozilla firefox.

and as another noobish thing...
in the ifv code, i have basically only made a few changes on some stuff and now it doesn't want to fire. when i press ctrl on a spot there is no red cursor and the unit doesnt want to fire. this only happens when i have put a unit in it though.

here is code

;Infantry Fighting Vehicle - IFV
[FV]
UIName=Name:APOC
Name=IFV
Prerequisite=NAWEAP,NATECH
Primary=HoverMissile
Strength=1000
Category=Transport
Armor=concrete
DeployTime=.022
TechLevel=9
Sight=8
PipScale=Passengers
Speed=3
CrateGoodie=yes
Owner=Africans,Arabs,British
Cost=2000
Soylent=1000
Points=20
SizeLimit=3
ROT=5
Crusher=yes
OmniCrusher=yes
Turret=yes ;GEF should be no for ifv???
Passengers=3
Gunner=yes
AirRangeBonus=4
SelfHealing=yes
HasTurretTooltips=yes
TurretCount=4
WeaponCount=17

Weapon1=HoverMissile ;Normal
EliteWeapon1=HoverMissileE ;Normal
Weapon2=RepairBullet ;unusedzzzzzzzzzz
EliteWeapon2=RepairBulletE ;unusedzzzzzzzzzz
Weapon3=CRM60 ;Gattling Tank
EliteWeapon3=CRM60 ;Gattling Tank
Weapon4=FlakGuyGun ;Flak Track
EliteWeapon4=FlakGuyGun ;Flak Track
Weapon5=CRMP5 ;Tanks
EliteWeapon5=CRMP5 ;Tanks
Weapon6= ;unusedzzzzzzzzzz
EliteWeapon6= ;unusedzzzzzzzzzz
Weapon7=TankBolt ;Tesla Tank
EliteWeapon7=TankBoltE ;Tesla Tank
Weapon8=CRNuke ;Demolition Truck
EliteWeapon8=CRNuke ;Demolition Truck
Weapon9= ;unusedzzzzzzzzzz
EliteWeapon9= ;unusedzzzzzzzzzz
Weapon10=MirageGun ;Mirage Tank
EliteWeapon10=MirageGunE ;Mirage Tank
Weapon11=Comet ;Prism Tank
EliteWeapon11=Comet ;Prism Tank
Weapon12= ;unusedzzzzzzzzzz
EliteWeapon12= ;unusedzzzzzzzzzz
Weapon13=RoboGun ;Robot Tank
EliteWeapon13=RoboGun ;Robot Tank
Weapon14=DredLauncher ;V3 Launcher
EliteWeapon14=DredLauncher ;V3 Launcher
Weapon15= ;unusedzzzzzzzzzz
EliteWeapon15= ;unusedzzzzzzzzzz
Weapon16= ;unusedzzzzzzzzzz
EliteWeapon16= ;unusedzzzzzzzzzz
Weapon17= ;unusedzzzzzzzzzz
EliteWeapon17= ;unusedzzzzzzzzzz



;Weapons
;GEF
;0=normal
;1=extra turret
;2=cannons
;3=high-tech

NormalTurretIndex=0
NormalTurretWeapon=0
RepairTurretIndex=0
RepairTurretWeapon=2
MachineGunTurretIndex=1
MachineGunTurretWeapon=3
FlakTurretIndex=1
FlakTurretWeapon=4
PistolTurretIndex=1
PistolTurretWeapon=5
SniperTurretIndex=0
SniperTurretWeapon=6
ShockTurretIndex=3
ShockTurretWeapon=7
ExplodeTurretIndex=3
ExplodeTurretWeapon=8
BrainBlastTurretIndex=0
BrainBlastTurretWeapon=9
RadCannonTurretIndex=1
RadCannonTurretWeapon=10
ChronoTurretIndex=1
ChronoTurretWeapon=11
TerroristExplodeTurretIndex=0
TerroristExplodeTurretWeapon=12
CowTurretIndex=0
CowTurretWeapon=12
InitiateTurretIndex=1
InitiateTurretWeapon=13
VirusTurretIndex=2
VirusTurretWeapon=14
YuriPrimeTurretIndex=0
YuriPrimeTurretWeapon=15
GuardianTurretIndex=0
GuardianTurretWeapon=16



IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=ApocalypseSelect
VoiceMove=ApocalypseMove
VoiceAttack=ApocalypseAttackCommand
VoiceFeedback=
DieSound=GenVehicleDie
EnterTransportSound= IFVTransform
LeaveTransportSound= IFVTransform
MoveSound=ApocalypseMoveStart
CrushSound=TankCrush
DebrisMaximums=6
Maxdebris=3
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
Weight=3.5
MovementZone=Normal
ThreatPosed=10 ; This value MUST be 0 for all building
DamageParticleSystems=SparkSys,SmallGreySSys
ZFudgeColumn=10
ZFudgeTunnel=13
Size=6
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ImmuneToPsionics=yes
OmniCrushResistant=yes
BuildTimeMultiplier=1.0

ElitePrimary=HoverMissileE
;Bombable=no
DeathWeapon=CRNuke
AllowedToStartInMultiplayer=yes

FlyingZ
03-31-2007, 02:31 AM
Not to hijack the thread but Passengers=3 seems it would be a big prob if one was an engineer.

Attached is a start if you’re interested Tesla

Corsarus
03-31-2007, 10:23 PM
the passengers=3 is ok if you take out all the infantries ability to enter an ifv with special effect (delete ifvmode=?)
then it only works with vehicles.

:rant:---don't you love that smilie?

Fenring
04-01-2007, 12:38 AM
Originally Posted by FlyingZ
Category=AFV ;I believe this is obsolete

For buildings yes but units? That’s news to me. No time to test at the moment.
From what I remember BuildCat=Combat places a building in the defence tab. The rest do what exactly Fenring?
BuildCat is used on buildings to determine placement, much like that of Category on infantry, aircraft and vehicles.

Usable values for Category;
AirLift - air transport
AirPower - air combat support/attack
Transport - transport vehicle/vessel
Support - misc. support vehicle/vessel
LRFS - long-range fire support
IFV - infantry fighting vehicle
AFV - armored fighting vehicle/vessel
Recon - reconnaisance vehicle/vessel
VIP - important infantry
Soldier - infantry units
Civilian - civilian people

Usable values for BuildCat;
Combat - defensive structures, superweapons, upgrades, etc
Infrastructure - not known, effect not fully tested
Resource - any structure that holds money or docks miner types
Power - any structure that supplies positive power values
Tech - any structure that provides new building options, any other structures
DontCare - usable and parsed but displays cameo as though the object is partially constructed

Quote RULESMD
CrateGoodie = Can it appear out of a crate in multiplay (def=no)
It could be wrong I suppose.
There are several notes in the rules file that are wrong. If that statement were true, you wouldn't have to set CrateGoodie=no on the Destroyer. Also, have a look at the Ivan entries...

NO
The hotkey P Selects all units with IsSelectableCombatant=yes so it does have a use. Default is no

IIRC Selectable=yes is what your thinking of and that to is useless.
Selectable=no could have a use for some things
IsSelectableCombatant=
Should not be used on BuildingTypes. Can be set to 'true' or 'false', and determines whether or not this unit can be selected as part of a group with the 'select all units of same type' action on the Advanced Command Bar or with the relevant hotkey defined in KEYBOARD.INI.
Selectable=
Can be set to 'yes' or 'no' and determines whether or not this object can be selected by the player. Defaults to 'yes'.
So you were partially right. However, neither tag is obsolete. Both are used, both are parsed and both work properly.

This is something easy you could do to benefit everyone. Fenring, many others, and myself know all this but we could still benefit from a clean copy of rules as much as the noobs.
I whack truncated comments and empty lines in units and such but I leave entries alone.

BTW this forum crashes firefox. I had to use ie to post. Anyone else?
I use FF1.5 and FF2. Neither crash the boards.

the passengers=3 is ok if you take out all the infantries ability to enter an ifv with special effect (delete ifvmode=?)
then it only works with vehicles.
Vehicles cannot utilize IFV logic. This has been tested and confirmed.

Corsarus
04-01-2007, 01:26 AM
... odd, i've got it working to a point now...

FlyingZ
04-01-2007, 11:57 AM
BuildCat is used on buildings to determine placement, much like that of Category on infantry, aircraft and vehicles.

I still don't understand. Does the AI use it?

I realize Combat puts a building in the defensive tab.

Maybe VIP will be displayed higher in the sidebar than Soldier regardless of when it was built?


There are several notes in the rules file that are wrong. If that statement were true, you wouldn't have to set CrateGoodie=no on the Destroyer. Also, have a look at the Ivan entries...

CrateGoodie is excluded from both indicating (def=no) is correct



So you were partially right. However, neither tag is obsolete. Both are used, both are parsed and both work properly.

I'm just saying the default value is automatic so no need to state it.


Firefox seems ok now. I had about seven recording type programs running earlier which must of have had a conflict.


... odd, i've got it working to a point now...
What exactly r u making another BF?

Corsarus
04-01-2007, 02:32 PM
no, a ifv that works with tanks instead of infantry.
but i've got it working now, ne'er mind

Fenring
04-01-2007, 02:40 PM
I still don't understand. Does the AI use it?
Alright, after some digging, Category is used for threat detection for the AI, and also for AI team construction.

Maybe VIP will be displayed higher in the sidebar than Soldier regardless of when it was built?
Cameo sorting is based on tech level, cost, object types ordering and AIBasePlanningSide so Category has no bearing on sorting, as I originally stated, which I learned is false.

FlyingZ
04-01-2007, 05:09 PM
All right, after some digging, Category is used for threat detection for the AI, and also for AI team construction.
Cameo sorting is based on tech level, cost, object types ordering and AIBasePlanningSide so Category has no bearing on sorting, as I originally stated, which I learned is false.

Are you really sure it's used? After thinking about every AI code and in game action that I've ever seen I can't imagine where.
AI building stuff and base defense is all called out in the rules ini
AI attacks are called out in ai ini

Maybe at first it was to prevent an ai team from attacking a power plant while sitting under an enemy tesla coil. Even more likely there was an alternate sidebar design with multiple unit tabs that was discarded. Anyway it still seems to be leftover code that was never fully implemented (exception Combat). Only buildings ended up with two tabs.

AIBasePlanningSide
Allied=0
Soviet=1
Yuri=2
I thought if your sov and you get an allied mcv the allied stuff would go at the bottom so I tested and thats incorrect. So the only use I can think of for this is to limit the ai scanning to only the things it's allowed to use saving processor use. It is also in aitriggers for I believe the same purpose.

If you know otherwise details would be very interesting.

Dracaveli
04-01-2007, 06:35 PM
AI itself is a real pain, tryng to understand it can cause sleepless nights:tantrum:

Fenring
04-01-2007, 06:51 PM
Are you really sure it's used? After thinking about every AI code and in game action that I've ever seen I can't imagine where.
Put it this way... I have my Volkov set on VIP and the AI tries to get to it before hitting the Conscripts/TTroopers around it. So, in some sense, it works but probably not as effective as ThreatPosed.

Maybe at first it was to prevent an ai team from attacking a power plant while sitting under an enemy tesla coil.
Unlikely. AI units almost ALWAYS retaliate against whatever attacks it regardless of mission.

Even more likely there was an alternate sidebar design with multiple unit tabs that was discarded. Anyway it still seems to be leftover code that was never fully implemented (exception Combat). Only buildings ended up with two tabs.
VERY, very unlikely considering Category has been around since Tiberian Sun so it's unlikely it's unimplemented code... and pd/CNCVK would have noticed something to do with that while in the EXE as well.

AIBasePlanningSide
Allied=0
Soviet=1
Yuri=2
I thought if your sov and you get an allied mcv the allied stuff would go at the bottom so I tested and thats incorrect. So the only use I can think of for this is to limit the ai scanning to only the things it's allowed to use saving processor use. It is also in aitriggers for I believe the same purpose.
If you know otherwise details would be very interesting.
http://modenc.renegadeprojects.com/index.php/Cameo_Sorting

FlyingZ
04-01-2007, 07:46 PM
Put it this way... I have my Volkov set on VIP and the AI tries to get to it before hitting the Conscripts/TTroopers around it. So, in some sense, it works but probably not as effective as ThreatPosed.

Have you tested this with two units or buildings having the same ThreatPosed value?


Unlikely. AI units almost ALWAYS retaliate against whatever attacks it regardless of mission.

I must have been thinking about the avoidthreats logic

VERY, very unlikely considering Category has been around since Tiberian Sun so it's unlikely it's unimplemented code... and pd/CNCVK would have noticed something to do with that while in the EXE as well.

I was actually thinking of when the engine was first created. It likely would have been erased so it wouldn’t conflict with the used code. The only thing proven is it affects the sidebar when there is more than one option for placement. This is all just a guess anyway. Until someone has test results or a better theory I'll shut up about it.


http://modenc.renegadeprojects.com/index.php/Cameo_Sorting
This is true but doesn’t it seem there should be more to it than that? Like something to do with the ai or planning? I'll test sometime when time permits to see if removing all instances of the tag affects anything other than the sidebar. Is it the same as Multiside in an ai trigger?

Silly me when I tested AIBasePlanningSide earlier I used units.

Fenring
04-02-2007, 03:24 PM
Have you tested this with two units or buildings having the same ThreatPosed value?
Not officially, no but it is likely that I have without noticing. Also, remember that Category and BuildCat are two different things (eg; they're for different purposes).

I must have been thinking about the avoidthreats logic
ThreatAvoidanceCoefficient. wooooooooooo!
Put that to 1.0 on miner types. It's actually useful.

I was actually thinking of when the engine was first created. It likely would have been erased so it wouldn’t conflict with the used code. The only thing proven is it affects the sidebar when there is more than one option for placement. This is all just a guess anyway. Until someone has test results or a better theory I'll shut up about it.
Still very unlikely. The whole system has been around since Red Alert 1 and only been modified to support different systems. The basic engine structure hasn't really been modified at all.

AngryTiger
05-16-2007, 04:54 PM
I know I'm such a noob, but...

I'm using TibEd to make a mod. The only problem is... well, here they are:

-Changing Cameos (Adding new ones)
-Changing Load Screens (Just the writing; I don't care about anything but the text)
-The little bar at the bottom of the side selection screen (IE "Yuri's side is Unique.") How do I change that?
-Changing the models of vehicles/ships/aircraft- how do I do it?
-I know that it's something blatantly obvious, but HOW do you change the number of interceptors launchable by the Carrier? I would like to implement a version called the Nimitz-Class, exclusive to the US, with 6 interceptors.

If you don't feel like answering, that's fine. But if you have any good, easy to understand tutorials, let me know!

PS: If I make new units by cloning preexisting units and modding them, how do I make sure they have their new names? For example, America has a "Gattling GI" now, but when you go to build him in the sidebar, it says "MISSING NAME (E1G)" (E1G was my little code change).

Can I only make decent mods by down and dirty .ini modding? Or am I missing blatantly obvious mistakes?

Tesla
05-16-2007, 06:33 PM
TibEd is good kind of for getting started, but you really only learn how to be a good modder by using text editors to modify the .ini files. Nearly none of the stuff you have put by dashes can be done with TibEd or text editors. For tutorials, and necessary programs, you can go places like here (http://yrarg.cncguild.net/) or here (http://www.cncgames.com/).

AngryTiger
05-18-2007, 03:30 PM
Okay, so let's say I wanna make a new type of Harrier, one that can launch bombs. Could I just do something like:

; Intruder ;Harrier
[ORCA]
UIName=Name:ORCA
Name=Intruder
Image=FALC
Prerequisite=RADAR
Primary=Maverick
CanPassiveAquire=no ; Won't try to pick up own targets
CanRetaliate=no; Won't fire back when hit
Strength=150
Category=AirPower
Armor=light
TechLevel=3
Sight=8
RadarInvisible=no
Landable=yes
MoveToShroud=yes
;Dock=GAAIRC,GAHPAD,NAHPAD
Dock=GAAIRC,AMRADR
PipScale=Ammo
Speed=14
;PitchSpeed=0.9
;PitchAngle=0
PitchSpeed=1.1
PitchAngle=0
OmniFire=yes
Owner=British,French,Germans,Americans
ForbiddenHouses=Alliance
Cost=1200
Points=20
ROT=3
Ammo=1
Crewed=yes
ConsideredAircraft=yes
AirportBound=yes ; If I ever need to land and there are no airports I crash because I can only land on them
GuardRange=30
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=3
IsSelectableCombatant=yes
VoiceSelect=IntruderSelect
VoiceMove=IntruderMove
VoiceAttack=IntruderAttackCommand
VoiceCrashing=IntruderVoiceDie
DieSound=
MoveSound=IntruderMoveLoop
CrashingSound=IntruderDie
ImpactLandSound=GenAircraftCrash
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=20 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
AuxSound1=IntruderTakeOff ;Taking off
AuxSound2=IntruderLanding ;Landing
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=STRONGER,FIREPOWER,ROF
Fighter=yes
AllowedToStartInMultiplayer=no
ImmuneToPsionics=yes
ElitePrimary=MaverickE
PreventAttackMove=yes

And then underneath this, cut and paste the same set of information, only making the following changes...


; IntruderB ;Harrier Bomber
[ORCAB]
UIName=Name:ORCAB
Name=IntruderB
Image=FALC
Prerequisite=RADAR
Primary=Maverick3
CanPassiveAquire=no ; Won't try to pick up own targets
CanRetaliate=no; Won't fire back when hit
Strength=150
Category=AirPower
Armor=light
TechLevel=3
Sight=8
RadarInvisible=no
Landable=yes
MoveToShroud=yes
;Dock=GAAIRC,GAHPAD,NAHPAD
Dock=GAAIRC,AMRADR
PipScale=Ammo
Speed=14
;PitchSpeed=0.9
;PitchAngle=0
PitchSpeed=1.1
PitchAngle=0
OmniFire=yes
Owner=British,French,Germans,Americans
ForbiddenHouses=Alliance
Cost=1200
Points=20
ROT=3
Ammo=1
Crewed=yes
ConsideredAircraft=yes
AirportBound=yes ; If I ever need to land and there are no airports I crash because I can only land on them
GuardRange=30
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=3
IsSelectableCombatant=yes
VoiceSelect=IntruderSelect
VoiceMove=IntruderMove
VoiceAttack=IntruderAttackCommand
VoiceCrashing=IntruderVoiceDie
DieSound=
MoveSound=IntruderMoveLoop
CrashingSound=IntruderDie
ImpactLandSound=GenAircraftCrash
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=20 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
AuxSound1=IntruderTakeOff ;Taking off
AuxSound2=IntruderLanding ;Landing
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=STRONGER,FIREPOWER,ROF
Fighter=yes
AllowedToStartInMultiplayer=no
ImmuneToPsionics=yes
ElitePrimary=Maverick3E
PreventAttackMove=yes


Where I'm trying to make a new unit available called the "Harrier Bomber" equipped with bombs (like those carried by Boris's MiGs, designated the "Maverick3")


Would this work, or no?

Fenring
05-18-2007, 04:25 PM
So long as you add it to the [AircraftTypes] list and add a new string in the CSF file. However, ORCAB already exists as a string; it's a leftover from Tiberian Sun.

AngryTiger
05-18-2007, 04:28 PM
Wow, I'm dumb, TibEd let's me do it already!:

If your question/problem isn't mentioned here, please make a post in the Support Forum (http://www.tibed.net/forums) or contact Tech Support (http://www.tibed.net/email).
Editing problems
How come my unit won't build?
You need to check several properties:

The TechLevel property of an unit cannot be -1. A value of -1 means this unit isn't buildable.
The Prerequisite property tells what buildings you need in order to build a unit.
The Owner property specifies which side can build a unit. You should select all Allied houses, all Soviet houses and/or YuriCountry here.
The RequiredHouses makes a unit country-specific. The Tank Destroyer has all Allied houses in it's Owner field, but RequiredHouses is set to Germans - making this unit buildable by Germany only.
On the Basic page, there are also RequiresStolen...Tech properties. These settings control whether you need to infiltrate an enemy Battle Lab first before you can build this unit (setting them to No can make such special units buildable normally...)How do I change the name of my unit/How can I get rid of the "MISSING:" message (Red Alert 2)
Red Alert 2 has a very own way of handling unit names - they are not stored inside the Rules.ini file (which you're editing in TibEd), but in a file called RA2.CSF (or RA2MD.CSF for Yuri's Revenge).
The "Name" property on the General #1 page of TibEd has no effect. Instead, you must use the UIName property. You can take the following steps to succesfully add a new name for a unit:

Change the UIName property of your unit to "Name:MYUNIT" (without quotes).
In the TibEd Section Tree (see the 'Basic Guide (http://www.tibed.net/h_guide.php)') on the left side of the screen, scroll all the way down. You should see an entry called "File bag" here, with a sub-entry called "ra2.csf" or "ra2md.csf". If you only see the "File bag" entry, TibEd is not configured properly, check your Red Alert 2 game folder setting.
Double-click on the "ra2.csf" or "ra2md.csf" entry. A new window titled "CSF Editor" will open.
Click on the "Add string..." button in the upper-left part of the screen. The "Add string"-dialog will open. In the name field, enter the same value as you gave the UIName-property (that is "Name:MYUNIT" in our example).
http://www.tibed.net/images/tibed1/guide/guide5.png
In the Value field, enter the actual name of your unit.
Click on the Add button.
After that, click on the Save button and finally click on the "Return to TibEd" button.
You've now added a new unit string to the game! If you want to check if it works, do as you always do: click on the "Save changes to game" button and run the game!Note: You do not have to use "Name:MYUNIT", you can use almost any string instead of MYUNIT. Just be sure it does not conflict with existing ID's - for example, "Name:TANYA" is already used for Tanya!

Fenring
05-18-2007, 04:43 PM
I have an idea... stop using TibEd.

AngryTiger
05-18-2007, 04:55 PM
You know, that would work.

But, I just used it like they said, and it worked, so for the time being...

Nope.

Fenring
05-18-2007, 05:31 PM
If you use TibEd, you're nothing more than a point-and-click modder. You have no skill and no knowledge at all. Go get the XCC utilities, crack open the INI files and then come back.

AngryTiger
05-18-2007, 05:44 PM
Funny, I do all my main modding by text editing. Sorry if I don't know how to change my unit name with the .csf.

apple23
05-19-2007, 01:13 AM
TibEd comes with its own filebag with a csf editor built in. Use that for editing ur csf strings. And fenring, TibEd is really nothing more then the manual mode put into a more organized and easier to use fashion. There's not alot of difference between typing a name and selecting one from a pull down list. I know its easier but i don't really like having to scroll through miles of text just to find a name. Sure TibEd gliches a few times, but that is because the user did something wrong, not nessecarily the program itself. The skill in modding comes not from being able to remember the codename of a building, but knowing what a flag does and how to manipulate it. it takes just as much skill to use TibEd as it does to use the text file. its just easier because you have pull down lists and more organized interfaces.

Fenring
05-19-2007, 04:00 PM
TibEd is limiting. You can't do what you can manually. Besides, it's not hard to find anything in the files unless "FIND" is beyond your capability. :|

Actually, it takes less skill to be a point-and-click modder. If you actually use the files, you learn what the tags actually do instead of just dragging a yes or no out of a drop down menu. There's no chance of file corruption this way and you know exactly what you changed instead of being unaware. You can actually diagnose a crash with the files but you can't with TibEd. Also, TibEd doesn't have any Rock Patch support or AI editing support.

You're better off not being lazy and using XCC instead.

DragonFly1992
05-23-2007, 11:23 AM
Are there any tutirials on modding the AI?

Ive manged to change the size of the groups the AI's build but i'm not sure how to get it to make a greater effort to capture (or if unable to destroy) oil and also it builds 2 few ore miners late game when they have to go quite far

Fenring
05-23-2007, 08:30 PM
The AI can be quite the undertaking. It's a lot like unit editing and creation in that everything has to link together to work properly.

Basically, the AI is like this: you have an AI trigger which defines when or what triggers the event, who owns it and any other conditions like number of said object or other ones like low power or credits. All of that ties to a team type, which controls other parameters. The team type links together the task force, which contains the units the AI will use in the team and a script type, which defines the team's actions, be it capturing a derrick or garrisoning Battle Bunkers or patroling an area.

Read Deezire's AI guide in his INI Editing Guide. It explains what the tags do and is a BIG help in getting started. - http://www.deezire.net/

apple23
05-24-2007, 06:43 PM
if you select the yes or no out of the box, then test it, you will learn what the tags do, and its really not that much easier, its just more organized. And what do you mean when you say that TibEd is limiting?

Fenring
05-25-2007, 11:17 AM
You can't add tags to unit if it's not on it already. So technically, you learn very little since the supported tags are obvious as all hell or some look obvious but do something else.

Tell me, Mr TibEd, what does Teleporter=yes do?

DragonFly1992
05-25-2007, 04:01 PM
well ive tried tibed and concluded that it doesn't have stuff for editing alot of what i wan't, doesn't have satifactory definitions for loads of stuff and decided that I ain't paying to use it after 30 days. Seem to have ended up editing half the stuff in text editors anyway lol....


Anyway back to AI editing...
I have looked through the stuff you linked to but I still don't see a way to make the AI build more miners. The allie AI's for example always seem to only build up to 4 miners even if they build 3 ore refinarys. They also seem to have troble replaceing destroyed miners qucking despite me increaseing the weighting on all triggers with the word "miner" in the name by 10 times....

Fenring
05-25-2007, 08:36 PM
The AI won't arbitrarily build extra miners. It has to lose them before replacing them.

DragonFly1992
05-26-2007, 05:33 PM
So it is not possible for me to make the ai to build a few more?

Fenring
05-26-2007, 05:53 PM
Not usually. You could toy with HarvestersPerRefinery though.

DragonFly1992
05-27-2007, 05:41 AM
I set that to 5 ages ago with no noticeable effect :(

Fenring
05-28-2007, 09:02 PM
You could always bump up AIExtraRefineries but I don't know if that would help. You could try setting up several condition triggers. Set it up so if the AI owns 1 miner, it builds another and when it owns 2, it builds another and so on until you reach however many you want. Set the priority to around 1500 on each weighting variable so it doesn't take over.

DragonFly1992
05-29-2007, 07:14 AM
I managed to do it with these triggers :)


0D53099D-G=More Soviet Miners,0ECCB03C-G,ALL<ALL><ALL>,1,1,HARV,0600000001000000000000000000000000000000000000000000000000000000,1500.000000,1500.000000,1500.000000,1,0,2,0,NONE<NONE>,1,1,1
0D53099E-G=More Allied Miners,0ECC97DC-G,ALL<ALL><ALL>,1,1,CMIN,0600000001000000000000000000000000000000000000000000000000000000,1500.000000,1500.000000,1500.000000,1,0,1,0,0CB246CC-G,1,1,1

EDIT: seems this fourm doesn't like things in brackets...

apple23
05-31-2007, 08:26 PM
You can't add tags to unit if it's not on it already. So technically, you learn very little since the supported tags are obvious as all hell or some look obvious but do something else.

Tell me, Mr TibEd, what does Teleporter=yes do?

I haven't toyed around with this flag yet, but it seems to be tagged on anything capable of chronoshift movement, so I'm assuming that's what it does. Besides, I'm not using TibEd anymore.

Fenring
05-31-2007, 09:06 PM
I haven't toyed around with this flag yet, but it seems to be tagged on anything capable of chronoshift movement, so I'm assuming that's what it does. Besides, I'm not using TibEd anymore.
*buzzer* No, I'm sorry that was the wrong answer. You lose 50 points. :p

wthigon
05-31-2007, 09:25 PM
Teleporter=yes means it can be teleported by chronosphere... I win :gnarly:

Fenring
05-31-2007, 09:37 PM
Only works on infantry though. Add it to a chrono vehicle and it doesn't chrono. :p

Jester Kirby
06-10-2007, 06:16 PM
Alright I have some questions, I haven't modded in like 2 years so I'm rusty. First off where do I get the XCC mixer again? or whatever it was that fixed it so your new units didn't have MISSING in their name. Also, when useing this how do I modify just my mod, not the entire game itself. I did that last time and messed up everything.

2nd question

If I made a seperate folder in my ra2 directory and put my mod in it, would it still work?

3rd question
Can I do a seperate folder for my art files?

4th and final question,
When I get a resource voxel from a sight, What all did I need to reference in the art.ini again to have it for a unit?

final note: use baby language, lol I haven't even started getting any of my ini files I'm going to need yet. :)

Fenring
06-11-2007, 12:29 PM
Alright I have some questions, I haven't modded in like 2 years so I'm rusty. First off where do I get the XCC mixer again? or whatever it was that fixed it so your new units didn't have MISSING in their name. Also, when useing this how do I modify just my mod, not the entire game itself. I did that last time and messed up everything.
XCC: http://xhp.xwis.net/
RA2StrEdit: http://yrarg.cncguild.net/pages/hosted/ra2stredit.zip

If I made a seperate folder in my ra2 directory and put my mod in it, would it still work?
No idea, never tried that. You could try but I don't think it will work.

Can I do a seperate folder for my art files?
All mod assets, barring a few, go into MIX files. Point of interest, NEVER modify the game's original files. Make your own MIX files.

When I get a resource voxel from a sight, What all did I need to reference in the art.ini again to have it for a unit?
The name of the voxel. Say you find tank.vxl, you would use [TANK] in art and rules to identify it. If it has a turret and barrel, the game will automatically pick them so long as they're named tanktur.vxl and tankbarl.vxl. Keep in mind that ALL voxels MUST have a corresponding HVA with the SAME name.

wthigon
06-11-2007, 11:28 PM
This question is for Fenring. Which Rock Patch do you use the most? VK left only the Rock Patch that PD worked on, he deleted the ones he did.

Jester Kirby
06-12-2007, 12:59 AM
Okay, for Fenrings modding bits topic, in making a better AI, the first part, what ini file is all of that in? Like the team delays and such.

Also, I have a cameo icon picture in with my mod, however it isnt showing up when I reference my new unit to it in the art.md.

[MAMUg] ; Mammoth Tank
Voxel=yes
Remapable=yes
Cameo=4TNKICON
AltCameo=4TNKICON
PrimaryFireFLH=190,25,120

tis what I have for it.

Fenring
06-12-2007, 09:25 AM
This question is for Fenring. Which Rock Patch do you use the most? VK left only the Rock Patch that PD worked on, he deleted the ones he did.
CE52 and 1.10 #36. :p

Okay, for Fenrings modding bits topic, in making a better AI, the first part, what ini file is all of that in? Like the team delays and such.
Rules.

Also, I have a cameo icon picture in with my mod, however it isnt showing up when I reference my new unit to it in the art.md.

[MAMUg] ; Mammoth Tank
Voxel=yes
Remapable=yes
Cameo=4TNKICON
AltCameo=4TNKICON
PrimaryFireFLH=190,25,120

tis what I have for it.
You should probably use [MAMUG].

hogo98
06-12-2007, 10:31 AM
I have a question for you Fenring.
What is the most important thing to do when creating a mod? Obviously your opinion but I would like to know.;)

Jester Kirby
06-12-2007, 11:03 AM
It didn't work, I changed the name but still getting a missing cameo. The unit looks fine just no build icon. Do I need something besides the picture in my RA2 directory when referencing to it in the art.md?

Fenring
06-12-2007, 01:47 PM
I have a question for you Fenring.
What is the most important thing to do when creating a mod? Obviously your opinion but I would like to know.;)
Balance. Simple as that.

It didn't work, I changed the name but still getting a missing cameo. The unit looks fine just no build icon. Do I need something besides the picture in my RA2 directory when referencing to it in the art.md?
Do you have a file named 4tnkicon.shp in a MIX file or the /RA2/ directory?

Jester Kirby
06-12-2007, 04:10 PM
Balance. Simple as that.


Do you have a file named 4tnkicon.shp in a MIX file or the /RA2/ directory?

It doesnt have .shp on the end of it. Is there a tutorial on how to make it a shp file?

Fenring
06-12-2007, 05:47 PM
What format is your image and where did you get it?

Jester Kirby
06-12-2007, 06:13 PM
.pcx is at the end of its name, and I got it from YR argentina.

Fenring
06-12-2007, 07:33 PM
Then you need to convert it to SHP (TS) with the XCC Mixer.

Jester Kirby
06-12-2007, 07:40 PM
Ah, so it's an XCC mixer thing. Alright cool.

One more question...:color2:

I added my new tank in the AI.ini. While at it I also made a bunch of the allied attack teams bigger. But...the computer keeps pileing all the units up and they cluitter his base. Is there a way I can fix this? I'm useing a program that inports the rules.ini and the AI.ini and makes it real simple to edit.

Would removing the "regroup" command send them strait at me all at once or would they come at me 1 at a time as he builds them...?

Or...would reducing the teams back down simply be the best thing I could do for the comp?

wthigon
06-12-2007, 09:30 PM
I just found the Mutalisk SHP I had saved a long time ago. Anyone want it? :cool:

Fenring
06-13-2007, 08:48 AM
But...the computer keeps pileing all the units up and they cluitter his base. Is there a way I can fix this?
Go to PPM and find the AI tutorial by Kiith-Sa. That should help.

I just found the Mutalisk SHP I had saved a long time ago. Anyone want it? :cool:
Sure, why not? :p

Jester Kirby
06-13-2007, 09:22 AM
Go to PPM and find the AI tutorial by Kiith-Sa. That should help.

Thanks! Found my answer in it. :color3:

LtMisha
07-25-2007, 07:25 AM
Hi Nikola Tesla.
is there any way to make a new nation using Tib-Ed? I could make a supervillain faction like Goldfinger or Khallos Corp....:evil:

Fenring
07-25-2007, 07:32 AM
Not with TibEd.

apple23
07-26-2007, 02:14 PM
you need the Rock Patch and you still can't do it with TibEd. I would also suggest 2 things:

1. Don't use TibEd. you can do so much more with the game without it.
2. If you want to make a new country, just replace one of the ones that game has already made. This is alot easier than making a new country entirely

Fenring
07-26-2007, 07:48 PM
Even replacing one can be a challenge. You still have to make a new loading screen and if you want to change sides, holy hell, that can make for a lot of work. If you've ever played the mod "Sudden Strike," Sydr0 moved Korea to the Yuri side and had a hell time trying to do it. If I can dig up his tutorial on chaging sides, I'll give you a link.

Saku91
08-12-2007, 02:36 AM
Hi! I have rules.ini file in tiberian sun, and I know how to edit it. But I don't have it in RA2. Where can I get it? It's not in my RA2 file, and I couldn't find it from internet. Could someone send it in my e-mail?

Fenring
08-13-2007, 01:45 PM
Why not get it yourself instead? (http://xhp.xwis.net)

apple23
08-20-2007, 07:47 PM
look for the XCC mixer. Just open your RA2 folder(with the XCC mixer, assuming you downloaded it), open RA2.MIX(or RA2MD for YR) then go to local.mix and find the rules file there. You can also have fun while you're at it with some voxels in that file if you have a voxel editor.