View unanswered posts | View active topics It is currently Fri Dec 27, 2024 9:54 am



Reply to topic  [ 11 posts ] 
 Pre-Equipping Actors 
Author Message

Joined: Sat Aug 20, 2011 10:50 am
Posts: 23
Reply with quote
Post Pre-Equipping Actors
Hello, could someone tell me how to create an actor pre-equipped with a weapon, so when I place them in build mode or buy them in-game they are already equipped with a weapon? For an example, a Coalition Heavy Soldier pre-equipped with a shotgun, pistol and digger. Then he could show up on the buy menu and build mode as one actor, just like the uni-tec soldiers.

I love this feature with uni-tec and various other mods because it saves me the trouble of individually adding items to actors on the buy menu while I must fend off attackers.

I saw an FAQ that was starting to go into the concept but it was never finished, just like countless other could-be-useful threads.


Wed Oct 26, 2011 8:34 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Pre-Equipping Actors
Check out line 1060 of base.rte/actors/clones/clones.ini. Just copy that bit over to your actor, and remove the comment slashes. [the //s]

Also, for future reference, this thread would have been much more fitting in the mod making section.


Wed Oct 26, 2011 11:59 am
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Pre-Equipping Actors
Taken from an older UniTec version, maybe this'll help you out: :)

Code:
AddActor =          // Fill in the actor type: AHuman or ACrab. Keep in mind that it is pointless to add items to an ACrab. It can't use them.
   CopyOf =             // Use the name of an existing actor name here: Dummy, Dreadnaught etc.
   PresetName =       // Put your own unique name here, for example: Sniper Dummy, My Coalition Guy, Dreadnaught of Doom, whatever you like, as long as it's unique.
   Description =        // Shown next to the PresetName in the buylist. Tip: Type a description of the actor: AK-47 Coalition Soldier, My Rocketlauncher Dummy, Sniper Guy.
   Buyable = 1          // Only needed if you're choosing an actor in-game that is otherwise non-buyable.
   AddToGroup =       // Groupname where your stuff is found under when in bunker making mode, for example: Pre-equipped Soldiers, My Squad.
   AddInventory =      // Use either 'HDFirearm', 'HeldDevice' or 'TDExplosive' here. All guns and diggers are HDFirearms. Shields are HeldDevices. Throwables are TDExplosives.
      CopyOf =      // Use the name of an existing HDFirearm, HeldDevice or TDExplosive here, like: AK-47, Frag Grenade, Riot Shield.
   AddInventory =      // Use a second or even 3rd or 4th AddInventory to add more items to your character...
      CopyOf =      // ...however, make sure your character won't be too heavy.
      GoldValue = 0// Add this if you don't want the gun to have a cost. Cortex Command cannot display the cost of an actor's inventory. But any inventory item costs are still deducted upon purchase if GoldValue = 0 is not used.

Using this you can just copy an existing actor and add stuff to it. You just have to place it in an .ini file somewhere.
If you need further help, feel free to give me a nudge. :)


Wed Oct 26, 2011 1:07 pm
Profile

Joined: Sat Aug 20, 2011 10:50 am
Posts: 23
Reply with quote
Post Re: Pre-Equipping Actors
So far, I created a new folder in Coalition.rte/Actors called pre-equipped. I added an .ini file into the folder and put in what's below exactly as follows:

I added "IncludeFile = Coalition.rte/Actors/pre-equipped/Pre.ini" into the actors.ini inside the Coalition.rte/Actors folder. When I went into the game, I was prompted with this error: Image

What did I do wrong?
Gotcha! wrote:
Taken from an older UniTec version, maybe this'll help you out: :)

Code:
AddActor =          // Fill in the actor type: AHuman or ACrab. Keep in mind that it is pointless to add items to an ACrab. It can't use them.
   CopyOf =             // Use the name of an existing actor name here: Dummy, Dreadnaught etc.
   PresetName =       // Put your own unique name here, for example: Sniper Dummy, My Coalition Guy, Dreadnaught of Doom, whatever you like, as long as it's unique.
   Description =        // Shown next to the PresetName in the buylist. Tip: Type a description of the actor: AK-47 Coalition Soldier, My Rocketlauncher Dummy, Sniper Guy.
   Buyable = 1          // Only needed if you're choosing an actor in-game that is otherwise non-buyable.
   AddToGroup =       // Groupname where your stuff is found under when in bunker making mode, for example: Pre-equipped Soldiers, My Squad.
   AddInventory =      // Use either 'HDFirearm', 'HeldDevice' or 'TDExplosive' here. All guns and diggers are HDFirearms. Shields are HeldDevices. Throwables are TDExplosives.
      CopyOf =      // Use the name of an existing HDFirearm, HeldDevice or TDExplosive here, like: AK-47, Frag Grenade, Riot Shield.
   AddInventory =      // Use a second or even 3rd or 4th AddInventory to add more items to your character...
      CopyOf =      // ...however, make sure your character won't be too heavy.
      GoldValue = 0// Add this if you don't want the gun to have a cost. Cortex Command cannot display the cost of an actor's inventory. But any inventory item costs are still deducted upon purchase if GoldValue = 0 is not used.

Using this you can just copy an existing actor and add stuff to it. You just have to place it in an .ini file somewhere.
If you need further help, feel free to give me a nudge. :)


Thu Oct 27, 2011 12:08 am
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Pre-Equipping Actors
Did you use tabs?
Can you post the ini file itself? (Change extension to .txt so that you can upload it.)

Edit: Also, are you sure the .ini file you made is loaded AFTER the guns are defined?
Edit2: Oh yeah, very important: Don't put any // lines after a variable. CC doesn't always like this. :)
E.g. put any comments you have in its own line.


Thu Oct 27, 2011 1:06 am
Profile

Joined: Sat Aug 20, 2011 10:50 am
Posts: 23
Reply with quote
Post Re: Pre-Equipping Actors
I figured out my problem. It was a spacing error. I copy and pasted it directly from your post so the margins were screwed up, just had to add in tabs and it worked. Thanks a lot!
Gotcha! wrote:
Did you use tabs?
Can you post the ini file itself? (Change extension to .txt so that you can upload it.)

Edit: Also, are you sure the .ini file you made is loaded AFTER the guns are defined?
Edit2: Oh yeah, very important: Don't put any // lines after a variable. CC doesn't always like this. :)
E.g. put any comments you have in its own line.


Thu Oct 27, 2011 1:39 am
Profile
User avatar

Joined: Mon May 23, 2011 3:41 pm
Posts: 269
Reply with quote
Post Re: Pre-Equipping Actors
I added weapons as you wrote but I can not add weapons from different folders, eg: dezert Deagle from ronin faction and from coalition machin gun and i have an error


Tue Dec 06, 2011 6:25 pm
Profile
User avatar

Joined: Tue Dec 23, 2008 8:04 pm
Posts: 1545
Reply with quote
Post Re: Pre-Equipping Actors
That wouldn't work because your file is being loaded before the others, so it's trying to add weapons that aren't there.
Try putting it in a .rte which starts with a couple of z's. Like zzzomgawesomeperonalacter.rte(which would be rather long but you get my point.)
That .rte needs to have an index.ini which refers to the .ini which contains your customized actor.
If that doesn't work you have to also load the weapons with that index.ini. Dunno if it would, too long ago.


Wed Dec 07, 2011 6:34 pm
Profile
User avatar

Joined: Fri Aug 20, 2010 4:45 am
Posts: 911
Location: No Comment.
Reply with quote
Post Re: Pre-Equipping Actors
Don't ask me why but when i saw the title to this Topic i was thinking more along the lines of a line up of actors, Inside a launch bay allowing the player to select units there weapons, unit upgrades such as heavy armor, weapon upgrades such as "Mr Freeze" bullets and Et cetera.

But to gain access to upgrades you would have to earn Oz for Successful missions, uncessful missions would be met with the loss of Oz from the players account?

-------------------------------------------------------------------------------------------------------------------

- Edit

Anyway thank you for the Code.


Wed Dec 07, 2011 6:56 pm
Profile
User avatar

Joined: Mon May 23, 2011 3:41 pm
Posts: 269
Reply with quote
Post Re: Pre-Equipping Actors
I make working soldier but is not readed by cortex command Help

First index:
DataModule
ModuleName = Operational Force Team
IconFile = ContentFile
Path = ZZZ1est Force team.rte/ModuleIcon.bmp
IncludeFile = ZZZ1est Force team.rte/Actor.ini

And my actor:
AddActor = AHuman
CopyOf = Soldier Light
PresetName = Spec Op
Description = Trained in Figth Standard soldiers with eqiupment
Buyable = 1
AddToGroup = Actors
AddInventory = HDFirearm
CopyOf = Badass Weapon
AddInventory = HDFirearm
CopyOf = Glock
AddInventory = TDExplosive
CopyOf = Grenade
AddInventory = TDExplosive
CopyOf = Grenade
GoldValue = 320


Thu Dec 08, 2011 6:24 pm
Profile
User avatar

Joined: Mon Oct 10, 2011 12:50 am
Posts: 75
Location: Look behind you... Haha I tricked you, I am in Brazil.
Reply with quote
Post Re: Pre-Equipping Actors
Hey, I made a .ini and put it in Ronin.rte/Actors/RoninSoldier. When I try to enter the game it tells me this:

Abortion in file .\System\Reader.cpp, line 534, because:

Could not match property in Ronin.rte/Acoters/RoninSoldier/Soldier.ini (soldier.ini is the file I made) at line 9! The last frame has been dumped to 'abortscreen.bmp'.

Here is what I wrote in the .ini:

AddActor = AHuman
CopyOf = Dafred
PresetName = Terrorist
Description = It's a terrorist with an AK-47, a glock, and some grenades.
Buyable = 1
AddToGroup = Terrorists
AddInventory = HDFirearm
CopyOf = AK-47
AddInventory = HDFirearm
CopyOf = Glock
AddInventory = TDExplosive
CopyOf = Frag Grenade

AddActor = Ahuman
CopyOf = Dimitri
PresetName = Sniper Terrorist
Description = A terrorist with a sniper and a glock.
Buyable = 1
AddToGroup = Terrorists
AddInventory = HDFirearm
CopyOf = Sniper Rifle
AddInventory = HDFirearm
CopyOf = Glock

I did something wrong? And I know it isn't because it has two actors, because line 9 is still on the first one.


Wed Dec 14, 2011 5:58 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.045s | 13 Queries | GZIP : Off ]