Shirtpower
  • Shirtpower
  • 50.25% (Neutral)
  • Private Topic Starter
10 years ago
Can a vehicle produce infantry, or at least deploy into a building/factory unit and then produce infantry? I tried a few dozen ways that have resulted in some fun things but not in what I was after..
Sponsor
Zatsupachi
10 years ago
Yes you can, its just you can't set rally points(?)

If you want it to deploy before producing infantry you can use GLA Combat Bike Logic-- assuming you want it to be stationary and it to switch commandsets.

Or.
You can have it just straight up make units.

You also have to make sure it has STRUCTURE and FS_BARRACKS(?) KindOfs.

(?)citation needed.

ALSO
-I bet you're expecting codes... So, I'll be posting/editing this post when I have an example of it.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
Shirtpower
  • Shirtpower
  • 50.25% (Neutral)
  • Private Topic Starter
10 years ago
A week of testing later and I still haven't managed to make a vehicle produce infantry, I would love to make something similar to the command center vehicle in RA2- it drives somewhere I turn it into a building and it produces infantry, I tried a few different methods (all of the ones you mentioned included) and I still cannot make any headway.
Zatsupachi
10 years ago
well, this might not be what you're hoping for but this is a less complicated solution.



Points:
I'm not going to go in-detail on how I make such monstrosities.
But I'm just going to put down the important bits.


1.

  ; *** ENGINEERING Parameters ***
  RadarPriority     = STRUCTURE
  KindOf            = PRELOAD STRUCTURE SELECTABLE SCORE FS_FACTORY REPAIR_PAD FS_WARFACTORY MP_COUNT_FOR_VICTORY IMMUNE_TO_CAPTURE VEHICLE HUGE_VEHICLE CAN_CAST_REFLECTIONS EMP_HARDENED CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT SPAWNS_ARE_THE_WEAPONS GARRISONABLE_UNTIL_DESTROYED;AUTO_RALLYPOINT IMMOBILE 

This is important.
You can remove things such as "SPAWNS_ARE_THE_WEAPONS", "EMP_HARDENED", "GARRISONABLE_UNTIL_DESTROYED" and any other KindOf that you don't need. Just don't remove "STRUCTURE"(I think), "FS_FACTORY" and "FS_WARFACTORY"("FS_BARRACKS" if it trains infantry)

2.

  Behavior = ProductionUpdate ModuleTag_05
    NumDoorAnimations            = 1
    DoorOpeningTime              = 4000  ;in mSeconds
    DoorWaitOpenTime             = 2000  ;in mSeconds
    DoorCloseTime                = 5000  ;in mSeconds
    ConstructionCompleteDuration = 1500  ;in mSeconds
  End
  Behavior = DefaultProductionExitUpdate ModuleTag_06
    UnitCreatePoint   = X:  0.0  Y:0.0   Z:0.0
    NaturalRallyPoint = X: 50.0  Y:0.0   Z:0.0;NaturalRallyPointX must always match GeometryMajorRadius! -ML
  End
  Behavior = RepairDockUpdate ModuleTag_07
    TimeForFullHeal   = 5000   ;(in milliseconds)     
    NumberApproachPositions = 5
  End
This is important.
ProductionUpdate alone makes it make units. You don't need DoorAnimation shenanigans, actually.
DefaultProductionExitUpdate is where the unit is spawned from in relation to wear the unit is facing.
RepairDockUpdate is optional. Replace it with the appropriate Module to heal infantry-- otherwise, if you don't want units being repaired/healed by this unit, remove the module.

<3>

CommandButton RS_BuildRevenger
  Command       = UNIT_BUILD
  Option = MUST_BE_STOPPED ;this makes its so that it can only be clicked/used once its not moving.
  Object        = RS_Revenger
  TextLabel     = CzAM:Tank_MBT
  ButtonImage   = CzAM_RS_MBT
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CzAM:Tank_MBTToolTip
End
This is optional, this is on the side of CommandButtons.
If you want the unit to stop before making units.

Otherwise, you can still make this work with Bike Logic.
Its complicated tho.

"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
Shirtpower
  • Shirtpower
  • 50.25% (Neutral)
  • Private Topic Starter
10 years ago
Oh production update, now that I look again it should've been painfully obvious I needed that. Thanks alot!
rey
  • rey
  • 52.5% (Neutral)
  • Major
10 years ago
question somewhere around the topic: can somebody help me with code for instant infantry "exchange"?
like for example i click on Rebel ability and next moment he's gone, but on his place Tunnel Defender appears. basically it's fast kill this infantry, create new on his position, even without any animations.
Zatsupachi
10 years ago
see Combat Bike Logic...

Look around the forums-- methinks.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
rey
  • rey
  • 52.5% (Neutral)
  • Major
10 years ago
Combat Bike changes rider not unit. i specifically mad example with too different units -it's not about switching weapon but about kill+create. so far i found nothing similar..
Zatsupachi
10 years ago
If you want unit switching to different modes.
combat bike IS what you want.
Each Rider can have a different model since riders are ConditionStates.

The other option is using the ReplaceObjectUpgrade Module.
Which However, DOES NOT carry over Health and rank.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
rey
  • rey
  • 52.5% (Neutral)
  • Major
10 years ago
switching modes is not what i'm after. can you please provide some examples about Replace? i mean upgrdae modules, i'm still bad about properly stating them in units body-code..
i just need the easiest code-wise way to make one unit disappear and another appear on his place. like if i'd select Rebel push a button and got Burton.
Zatsupachi
10 years ago

Behavior = ReplaceObjectUpgrade ModuleTag_xx
    TriggeredBy = [Entry(S) from upgrade.ini]
	FXListUpgrade = [entry from FXList.INI]
	ConflictsWith = [entry(s) from Upgrade.INI]
	RequiresAllTriggers = [Yes/No]
    ReplaceObject = [Object name]
End

"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
oliver
  • oliver
  • 50.25% (Neutral)
  • Major
10 years ago
Why don't you check ROTR codes of the Russian Supply Tuck.. After an upgrade, it produces infantry after an upgrade.
3D/2D Artist
rey
  • rey
  • 52.5% (Neutral)
  • Major
10 years ago

Why don't you check ROTR codes of the Russian Supply Tuck.. After an upgrade, it produces infantry after an upgrade.

Originally Posted by: Oliver 

actually i'm exactly trying to modify ROTR and looking at Russian Supply Truck code = after upgrade it disappears and Field Quoter appears(totally other unit from another file) -that's what i'm after!
but sadly i can't figure everything out %( lots of file to modify, at least= CommandSet, CommandButton, ObjectCreationList, RussianUpgradeObjects, and files of infantry i'm trying to make this all about..