TheInfantry
13 years ago
Hi guys!

Im glad to see, that this forum is still quite activ, i got lots of good ideas and stuff from this section :)
Maybe some of the more experienced guys here can help me or give me hint on a problem i have.
I startet playing CNCZH about two weeks ago after a longer break and startet mapping again.
Im working on a little Mission where your task is to play the Partisans from the Busher map.
I changed those guys a little bit, and need help with the last thingy.
I made one of the partisans use the angry mobยดs ak47 weaponset, but i also want to replace his originally "redguard-look-alike-rifle" with the optical AK47 that the mob is using after the upgrade...but i cant find any way to do this.
is there a way to change the optical weapons (and heads) that the partisans/units in general are using by ini-editing?


thanks in advance ๐Ÿ™‚
Sponsor
Rrtaya_tsamsiyu
13 years ago
to change the model you would have to make your own models with Gmax.
You could try using other infantry models tho, such as the rebel or ranger.
one soul at a time
TheInfantry
13 years ago
Hi!

Thanks for that fast reply - are you shure, that i cant do that change with inis?
On lots of maps you see crazy stuff like navalbases, attacking snowmans, the mortarman and so on...all without installing any mods, just using those inifiles.
and if im not totally wrong, the mob uses other weapons before you upgrade, then uses other ones..from pistols to the ak47, i just dont get HOW.
im not that familiar with stuff like that, so i better ask twice before i give up ๐Ÿ˜ƒ!

thanks sir.
Rrtaya_tsamsiyu
13 years ago
Your welcome.

The mob does use other weapons.When you upgrade, it changes the models. In Generals, a gun is part of the model same as a arm or leg.

For the look your going for tho, you could try using one of the angry mob infantry models
one soul at a time
TheInfantry
13 years ago
Hi Sir,

thanks for the bad news ๐Ÿ˜
I have been trying to use the GLAInfantryAngryMobPistol05 guy, but i cant figure out how to stop him from dying as soon as i start the map where i placed him.
I removed the Slavemodule but it did not help, and i could not see anyhting in the inizh file, that seems to be used to kill it.
do you have any idea how to start and does something like usable single mobfighters allready exist?

thanks again!
Rrtaya_tsamsiyu
13 years ago
lol, welcome.

im not sure what is auto-killing him. it might be the map or the INIs. i wouldn't use his original inis, i would probley use the inis from the Rebel or the Red Guard but use the model of the angry mob guy. if you change the inis like that and he's still dying when he pops up, its a map problem.

My best guess is that its an ini-problem tho.
one soul at a time
qqqqqqqqqp
13 years ago
OK I have done things like ur saying ,but i didn't care about the model...
SO what i would do would start off makeing a new units I'd name it Ak-47Gunner Then i would copy the whole part of the red Guard/Ranger part then find the model you want in it (not looking at code right now so i can't give exacts)Then replace the...The..entire W3d model with the ak47 one ,THEN!! Switch the Said RedGuard/Ranger's Weapon With The angry mob 47 so like this switched with this


>Ranger< Weapon = PRIMARY RangerAdvancedCombatRifle
>Red Guard< Weapon = PRIMARY RedguardMachineGun

>Ak-47Gunner< Weapon = SECONDARY(Change this to Primary or eles it will use it only on buildings i think.) GLAAngryMobAK47Weapon


Then have the command button,command set with it and it SHOULD work Keyword SHOULD!!!.
Hope this helpfull
9Q_1P at your service. Moddin help and mod maker ranges from paradrop planes, aircraftcarriers and yes snow men with death lazer eyes
Want a peek? Visit this page
Advanced warfare 
Rrtaya_tsamsiyu
13 years ago

Then replace the...The..entire W3d model with the ak47 one



You shouldn't have to do anything to the actual .w3d file. you just need to change the Model line in the INIs and the fire bones;


DefaultConditionState
Model = UNI_Ranger
WeaponFireFXBone = PRIMARY 101
WeaponMuzzleFlash = PRIMARY 101
End

Changed;
DefaultConditionState
Model = NKI_Conscript
WeaponFireFXBone = PRIMARY Gun1
WeaponMuzzleFlash = PRIMARY Gun1
End


Realisticly, all you need to do is copy/paste a unit's inis, like the ranger for example, and give it a new name, like changing AmericaInfantryRanger to AmericaInfantryTimmy. then change the weapon stuff if you want.

To make it buildable you would need to put this in commandbutton.ini

CommandButton Command_ConstructAmericaInfantryTimmy
Command = UNIT_BUILD
Object = AmericaInfantryTimmy
TextLabel = CONTROLBAR:ConstructAmericaInfantryRanger
ButtonImage = SARanger
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildRanger
End


and add this line to CommandSet AmericaBarracksCommandSet inside of commandset.ini;
9 = Command_ConstructAmericaInfantryTimmy

tada, new unit! lol.

edit; i think to add these to a map, you make a notepad file and name it the same as the ini needed, for example CommandSet.INI. not entirely sure, as i dont do much mapping at the moment.

Conformation/help from those more experienced in mapping would be nice.
one soul at a time
TheInfantry
13 years ago
Hi there!
Im feeling kinda stupid...but...do you have the changed and working ini for us by any chance?
I dont get that re-name thing, because when you start an entry in the inifile, you have to choose the unit you want to edit..Object CINE_AmericaInfantryRanger for example. But when i change the name, i cant place the little guys on the map anymore, cause the editor does not know Ak47MobGuy or whatever were supposed to call him.
I keep getting gamecrashes over and over again and im about to quit it, its frustrating :D
Maybe you can give us an example if you got the time and feel like it - you would be my god ๐Ÿ˜ƒ!
Rrtaya_tsamsiyu
13 years ago
Went ahead and made this, it may be what you need. Its basically an angry mob guy firing the gla rebel gun. i haven't tested it yet. Currently it should be called Partisan in-game and in the Worldbuilder, you can change that if you want. In Worldbuilder, you should be able to find him with the GLA infantry.

;------------------------------------------------------------------------------
Object GLAInfantryPartisan

; *** ART Parameters ***
SelectPortrait = SURebel_L
ButtonImage = SURebel

UpgradeCameo1 = Upgrade_GLAAPBullets
UpgradeCameo2 = Upgrade_GLACamouflage
UpgradeCameo3 = Upgrade_InfantryCaptureBuilding
UpgradeCameo4 = Upgrade_GLAInfantryRebelBoobyTrapAttack
;UpgradeCameo5 = NONE

Draw = W3DModelDraw ModuleTag_01

OkToChangeModelColor = Yes

; this says "we don't use these condition states at all, so completely
; ignore them for purposes of matchmaking"... this is useful to help
; reduce the number of AliasConditionState clauses you must add in
; order to avoid ambiguity in some cases.
IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A

; WHILE CARRYING AK47
;---------------------------------------------------------
ConditionState DefaultConditionState ;Idle with AK Slung
Model = UIMOB01_SKN
IdleAnimation = UIMOB01_SKL.UIMOB01_IDD1 0 6
IdleAnimation = UIMOB01_SKL.UIMOB01_IDD2 0 6
IdleAnimation = UIMOB01_SKL.UIMOB01_CHD 0 6
IdleAnimation = UIMOB01_SKL.UIMOB01_STD
AnimationMode = ONCE
AnimationSpeedFactorRange 0.9 1.1
TransitionKey = TRANS_STAND_AK
End

ConditionState = MOVING
Animation = UIMOB01_SKL.UIMOB01_RND
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = MOVING_AK
End
AliasConditionState = MOVING RELOADING_A
AliasConditionState = MOVING PREATTACK_A
AliasConditionState = MOVING FIRING_A
AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
AliasConditionState = MOVING RELOADING_C RELOADING_A
AliasConditionState = MOVING PREATTACK_C BETWEEN_FIRING_SHOTS_A

ConditionState = DYING
Animation = UIMOB01_SKL.UIMOB01_DD1
Animation = UIMOB01_SKL.UIMOB01_DD2
AnimationMode = ONCE
TransitionKey = TRANS_Dying
End

ConditionState = SPECIAL_CHEERING
Animation = UIMOB01_SKL.UIMOB01_CHD
AnimationMode = ONCE
End

; Drawing AK47
ConditionState = PREATTACK_B
Animation = UIMOB01_SKL.UIMOB01_ATD1_ST ; start firing
AnimationMode = ONCE
End
AliasConditionState = PREATTACK_B FIRING_B WEAPONSET_PLAYER_UPGRADE
AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE

; Firing Gun
ConditionState = FIRING_B
Animation = UIMOB01_SKL.UIMOB01_ATD1_LP ; looping firing
AnimationMode = LOOP
WeaponFireFXBone = SECONDARY MuzzleAK
WeaponMuzzleFlash = SECONDARY MuzzleAKFX
TransitionKey = TRANS_FIRING_AK
End
AliasConditionState = BETWEEN_FIRING_SHOTS_B WEAPONSET_PLAYER_UPGRADE


ConditionState = RELOADING_B
Animation = UIMOB01_SKL.UIMOB01_ATD1_ED ; end firing
AnimationMode = ONCE
End


; This transition allows him to put his gun away when he's finished attacking.
TransitionState = TRANS_FIRING_AK TRANS_STAND_AK
Animation = UIMOB01_SKL.UIMOB01_ATD1_ED ; end firing
AnimationMode = ONCE
End



TransitionState = TRANS_Dying TRANS_Flailing
Animation = UIMOB01_SKL.UIMOB01_A_ADTE1
Animation = UIMOB01_SKL.UIMOB01_D_ADTE1
AnimationMode = ONCE
End

ConditionState = DYING EXPLODED_FLAILING
Animation = UIMOB01_SKL.UIMOB01_A_ADTE2
Animation = UIMOB01_SKL.UIMOB01_D_ADTE2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End

ConditionState = DYING EXPLODED_BOUNCING
Animation = UIMOB01_SKL.UIMOB01_A_ADTE3
Animation = UIMOB01_SKL.UIMOB01_D_ADTE3
AnimationMode = ONCE
TransitionKey = None
End
End

; ***DESIGN parameters ***
DisplayName = OBJECT:Partisan
Side = GLA
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)

WeaponSet
Conditions = None
Weapon = PRIMARY GLARebelMachineGun
End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = GLABarracks
End
BuildCost = 150
BuildTime = 5.0 ;in seconds

ExperienceValue = 15 15 30 40 ;Experience point value at each level
ExperienceRequired = 0 40 60 120 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = GLAInfantryRebelCommandSet

; *** AUDIO Parameters ***
VoiceSelect = RebelVoiceSelect
VoiceMove = RebelVoiceMove
VoiceGuard = RebelVoiceMove
VoiceAttack = RebelVoiceAttack
SoundStealthOn = StealthOn
SoundStealthOff = StealthOff
VoiceFear = RebelVoiceFear
VoiceTaskComplete = RebelVoiceCaptureComplete
UnitSpecificSounds
VoiceCreate = RebelVoiceCreate
VoiceSubdue = RebelVoiceSubdue
VoiceGarrison = RebelVoiceGarrison
VoiceEnter = RebelVoiceMove
VoiceEnterHostile = RebelVoiceMove
VoiceGetHealed = RebelVoiceMove
End

; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE

Body = ActiveBody ModuleTag_02
MaxHealth = 120.0
InitialHealth = 120.0
End

Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes
End

Behavior = CommandButtonHuntUpdate ModuleTag_04 ; allows use of command button hunt script with this unit.
End

Locomotor = SET_NORMAL BasicHumanLocomotor

Behavior = PhysicsBehavior ModuleTag_05
Mass = 5.0
End
Behavior = StealthUpdate ModuleTag_07
StealthDelay = 2500 ; msec
StealthForbiddenConditions = ATTACKING USING_ABILITY
MoveThresholdSpeed = 3
InnateStealth = No ;Requires upgrade first
OrderIdleEnemiesToAttackMeUponReveal = Yes
End

Behavior = WeaponBonusUpgrade ModuleTag_09
TriggeredBy = Upgrade_GLAAPBullets
End
Behavior = StealthUpgrade ModuleTag_10
TriggeredBy = Upgrade_GLACamouflage
End


Behavior = SquishCollide ModuleTag_11
;nothing
End


; --- begin Death modules ---
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_RebelDie
End
Behavior = SlowDeathBehavior ModuleTag_Death02
DeathTypes = NONE +CRUSHED +SPLATTED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_GIDieCrushed
End
Behavior = SlowDeathBehavior ModuleTag_Death03
DeathTypes = NONE +EXPLODED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_RebelDie
FlingForce = 8
FlingForceVariance = 3
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieByFireGLA
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
DeathTypes = NONE +POISONED_BETA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
End
Behavior = SlowDeathBehavior ModuleTag_Death07
DeathTypes = NONE +POISONED_GAMMA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantryGamma
End

; --- end Death modules ---

Behavior = PoisonedBehavior ModuleTag_16
PoisonDamageInterval = 100 ; Every this many msec I will retake the poison damage dealt me...
PoisonDuration = 3000 ; ... for this long after last hit by poison damage
End

Behavior = SpecialAbility ModuleTag_17
SpecialPowerTemplate = SpecialAbilityRebelCaptureBuilding
UpdateModuleStartsAttack = Yes
StartsPaused = Yes
InitiateSound = RebelVoiceCapture
End
Behavior = SpecialAbilityUpdate ModuleTag_18
SpecialPowerTemplate = SpecialAbilityRebelCaptureBuilding
StartAbilityRange = 5.0
UnpackTime = 3000 ; (changing this will scale anim speed)
PreparationTime = 20000 ; time to complete hack once prepared (changing this will scale anim speed)
PackTime = 2000 ; (changing this will scale anim speed)
DoCaptureFX = Yes
AwardXPForTriggering = 12
;SkillPointsForTriggering = ??? -- Dustin, fill me out if you want different balance values.
End

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_19
SpecialPowerTemplate = SpecialAbilityRebelCaptureBuilding
TriggeredBy = Upgrade_InfantryCaptureBuilding
End

Behavior = SpecialAbility ModuleTag_20
SpecialPowerTemplate = SpecialAbilityBoobyTrap
UpdateModuleStartsAttack = Yes
StartsPaused = Yes
InitiateSound = RebelVoiceBoobyTrapInstall
End
Behavior = SpecialAbilityUpdate ModuleTag_21
SpecialPowerTemplate = SpecialAbilityBoobyTrap
StartAbilityRange = 5.0
PreparationTime = 0
SpecialObject = BoobyTrap
MaxSpecialObjects = 100
SpecialObjectsPersistWhenOwnerDies = Yes
SpecialObjectsPersistent = Yes ;Charges are persistent till lifetime expires or owner detonates them.
; Not implemented UniqueSpecialObjectTargets = Yes ;This prevents multiple charges placed on the same object.
End

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_22
SpecialPowerTemplate = SpecialAbilityBoobyTrap
TriggeredBy = Upgrade_GLAInfantryRebelBoobyTrapAttack
End

Geometry = CYLINDER
GeometryMajorRadius = 10.0
GeometryMinorRadius = 10.0
GeometryHeight = 12.0
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 14;
ShadowSizeY = 14;
ShadowTexture = ShadowI;
BuildCompletion = APPEARS_AT_RALLY_POINT

End

one soul at a time
TheInfantry
13 years ago
Hi there!

Your a god, thanks :P
Just a little bit of a problem...the WorldBuilder does not show anything new and the game is crashing while the script is added to the map.ini
As far as i can imagine, i think we have to let the WorldBuilder know, that there is something new he has to show in the GLAInfatry section?
Other "new" units like the GLAMortarMan or the USAPredatortank got the spot of some GLA/USA CINE Unit, so they could be found in the Worldbuilder, even if its showing the "old" unit in WorldBuilder, you got the "new" one ingame and can use it.
Im just not that good now to figure out how to do that myself ๐Ÿ˜• feelsbadbro!
The GLAMortarMan can be found here: CLICK ME <3 

I guess we will have tons of new and different units when this works ๐Ÿ™‚ your just great man!
Rrtaya_tsamsiyu
13 years ago

Your a god, thanks :P


Just doing what i can

As far as i can imagine, i think we have to let the WorldBuilder know, that there is something new he has to show in the GLAInfatry section?


The Worldbuilder should pick them up by itself, shouldn't need anything special for it to appear there.

i'm not sure how else to help, just keep trying different things, using the original units as templates. Thats about the only way to get better at this stuff is to keep working on it.
one soul at a time