cagftw00
  • cagftw00
  • 57.5% (Neutral)
  • Private Topic Starter
16 years ago
Im a bit of a noob, and by that I mean Ive been working with the editor for about 10 hours now. After floundering hopelessly for an hour before I found some tutorials that make sense here at cnclabs forums, I am underway at attempting my first generals creation.
I currently have my first map done as far as layout, but my ultimate goal is a series of maps, wrapped into a campaign, with any luck. The theme of said campaign will be the world of Special Operations. I have thus far figured out how to make custom units and have started making the unique infantry units that will compose the 8 man team. I know how to give certain abilities to different units - simple things like making the sniper not unstealth when moving, and so forth. I have in mind a unit resembling an SF Engineer. The starting unit is the GLA Demo Rebel. I like that this unit can be stealthed and lay booby traps, but I would also like to give him a few abilities of a GLA villager. I would like for him to be able to Clear mines, build stealthed demo charges, and also be able to repair structures.
I understand in a roundabout way what I need to do, but this is the most extensive unit I have created in my short time modding generals. I know that some animations and maybe some sounds will need to be copied, as the Rebel does not have build animations, and I know that I must copy some behavior modules to get things to work. I have been reading through these forums for a while now and they have been tremendously helpful, though sifting through all the different posts and looking at the endless lines of text in the INI file are beginning to take a toll on me. Usually I like to do stuff myself but it seems like the people here are usually more than willing to spell stuff out for noobs, so, if I may ask anyone more savvy with the editor than me, what exactly are the different things I need to C/P to make the GLA Demo Rebel be able to repair structures, be able to clear mines, be able to build stealthed demo charges. Any help would be appreciated, thank you.😎
Sponsor
Annihilationzh
16 years ago
Animations would have to be done manually in modelling software, but to get the rebel to act as a dozer (not a worker, because a worker collects supplies) you'll need these:

  WeaponSet
    Conditions = MINE_CLEARING_DETAIL 
    Weapon = PRIMARY DozerMineDisarmingWeapon
  End

 Kindof = DOZER ;[and all the others] 

  Behavior = DozerAIUpdate ModuleTag_Dozer
    RepairHealthPercentPerSecond = 2%    ; % of max health to repair each second
    BoredTime                    = 5000  ; in milliseconds
    BoredRange                   = 150   ; when bored, we look this far away to do something
    ; the only "enemies" that workers can acquire are mines, to be disarmed...
    AutoAcquireEnemiesWhenIdle   = Yes
  End

  Behavior = StealthDetectorUpdate ModuleTag_Sapper
    DetectionRate             = 500
    DetectionRange            = 100
    CanDetectWhileGarrisoned  = No
    CanDetectWhileContained   = No
    ExtraRequiredKindOf      = MINE
  End

Then you'll need to give him the button to build demo traps and clear mines in his commandset (don't forget to remove the demo trap's prerequisites).
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
cagftw00
  • cagftw00
  • 57.5% (Neutral)
  • Private Topic Starter
16 years ago
holy crap dude I posted that at like 6am last night and you had answered in like 20 minutes. how awesome. K so in my own experimentation I had figured some of this out, like giving him the DOZER kindof, cuz I noticed that villagers have that title too. I copied the alternate weaponset module too. I guess my question now is if I give him that behavior module with the bored time and range, will he forget that hes actually a soldier first and start looking for things to do? If so, could I just lower his range to like 1 and make him not so ADD? I dont really want him auto-acquiring mines and disarming them autonomously, putting himself in unecessary dangers when unprepared. But if I turn the auto-acquire off, will that also disallow him to auto-acquire hostile units? Oh yeah, and about the animations....would it not be a matter of C/P the animations the villager uses to build? I just want my Engi to pound a hammer as he removes a mine, builds a demo trap, or repairs. Maybe Im wrong or missin somethin completely lol I dunno...this is day 2 of editing generals for me, and I just slept all day and got on here when I woke up. lol. kk while I wait for any response to this Im gonna go try to find the tutorial I found before on making the buttons. thanks a bunch this has been very helpful.

heh just noticed your location is england. I guess thats why the quick response hehe. I guess it may be a bit for a response then, bein that its like 2 am there or somethin. hehe anyway thanks again.
Annihilationzh
16 years ago
You caught me when I woke up & did a 5 minute check of the forums. As for now, it's nowhere near 2am here, but it is late.

Before I was just quoting code. Now that there is a genuine problem with using that code, some new code needs to be used.

To be added at the bottom of CommandButton.ini
CommandButton Command_RebelMineClearing
  Command                 = FIRE_WEAPON
  WeaponSlot              = SECONDARY
  Options                 = OK_FOR_MULTI_SELECT NEED_TARGET_POS
  TextLabel               = CONTROLBAR:DisarmMinesAtPosition
  ButtonImage             = SSClearMines_L
  ButtonBorderType        = ACTIONis
  DescriptLabel           = CONTROLBAR:ToolTipDisarmMinesAtPosition
  RadiusCursorType        = CLEARMINES
  InvalidCursorName       = GenericInvalid
End

An update on the weaponset:
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY GLARebelMachineGun
    Weapon = SECONDARY WorkerMineDisarmingWeapon
    Weapon = TERTIARY TerroristSuicideNotARealWeapon
    AutoChooseSources = SECONDARY NONE
    AutoChooseSources = TERTIARY NONE
  End

Replacing the commandset in commandset.ini:
CommandSet Demo_GLAInfantryRebelCommandSet    
  1 = Command_GLAInfantryRebelCaptureBuilding
  2 = Command_GLAInfantryRebelBoobyTrapAttack
  3 = Command_RebelMineClearing
  4 = Demo_Command_ConstructGLADemoTrap
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End

An update on a previous entry (make sure you delete AIUpdateInterface):
  Behavior = DozerAIUpdate ModuleTag_03
    RepairHealthPercentPerSecond  = 2%
    AutoAcquireEnemiesWhenIdle    = Yes
  End

This way the rebel won't disarm mines by himself, but he'll still be able to disarm them. There are a lot of possible issues doing it this way, and I haven't tested it, so if it doesn't work, tell me & I'll think of something else.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
cagftw00
  • cagftw00
  • 57.5% (Neutral)
  • Private Topic Starter
16 years ago
wow awesome thanks a lot man I wasnt expecting to see anything more on this till tomorrow. I am just looking into the commandset and commandbutton things, but as far as I can tell its pretty much the same cutting and pasting as in changing units abilities, with a few extra things. I will do what your post says and hopefully get some testing done tonight. I would ideally like to create my whole 8 man team before I begin testing, the only one I suspect there will be problems with is this guy, the engineer, cuz all the rest have pretty straightforward changes. I'll let ya know how it turned out. thanks a bunch again.


hmmm a thought occurs....

CommandSet Demo_GLAInfantryRebelCommandSet
1 = Command_GLAInfantryRebelCaptureBuilding
2 = Command_GLAInfantryRebelBoobyTrapAttack
3 = Command_RebelMineClearing
4 = Demo_Command_ConstructGLADemoTrap
11 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End

will changing this is the commandset make the regular GLA demo rebels have the 2 extra buttons, presumedly unable to be used, as they lack the behavior module or the weapon to clear mines. Was I supposed to create a new entry at the bottom for this? I havent tested it yet, was just wondering as I was copying and pasting. thanks a bunch.


well, first round testing is complete, and Ive missed something about the buttons. I got all my guys to have all the buttons that I want them to, but they are all grayed out. I think this is because they are upgraded abilities and I have not done what is needed to upgrade. Im sure this is very trivial but I must have missed this throughout my course of learning the editor lol. well, back to the forums.


ok, another new development...my engineer wont move. I checked his locomotor, it looks just like the others,

Locomotor = SET_NORMAL BasicHumanLocomotor

So I dont think it is that. When I tell him to move to a new position he says ok, and kinda flinches, but doesnt actually walk. All the rest of my guys can walk, so it must be due to some change Ive made to him. Oh yeah, and his Clear Mine function appears to be operable, as I can click on it and get the radius on my icon, but he cant do it cuz he cant actually move. Its actually the only icon I have added that is at this point operable, all the rest are upgrades and I need to figure out how to make them start the mission with the abilities already. (flashbang, capture building, booby trap, lay demo trap, things like that)

I have this map all built, minus the scripting and pathing, and I would love to try it out but I am determined to get my 8 man team the way I want it first lol.

I am gonna look around some more in the ini to see what I can figure out, but at this point I am utterly stumped as to why my engineer wont walk. thanks again.


okay so I have thus far been able to get the buttons to work, through use of the Grantupgradecreate module, havent done it with all of them yet, but Ive gotten the flashbangs to work on my tactical sergeant and weapons sergeant, so I think that I have that issue worked out. Still no luck on the engineer not moving. will keep trying.
CommieDog
16 years ago
Watch it with the consecutive posts. This isn't supposed to be a development journal; if you really need to add something an hour after your last post, use the edit button.


As for the locomotor problem for your new unit, be sure that you have only one Locomotor= line and that it occurs after your DozerAIUpdate module.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
cagftw00
  • cagftw00
  • 57.5% (Neutral)
  • Private Topic Starter
16 years ago
Oh my bad on the consecutive posts thing...very sorry.
Wasnt really trying to make it a development journal, its just that I was gettin stuck in places and askin for help, then figurin it out and wanted to update the forum so Annihilation wouldnt waste time on somethin I already fixed. You are absolutely right though, I should have just been editing my original post, and in the future I will do just that when needs be.
And CommieDog fixed the immobility problem with my engineer. Problem was the Locomotor was before the dozer aiupdate. Didnt even know it was supposed to be after it, but my guy walks just fine now. I have almost all the button problems fixed with my guys too, so for the original intents and purposes of this topic, consider it closed. Big thanks to Annihilation and CommieDog.