Jump to content

Local Forces Equipment?


DarkExcalibur42

Recommended Posts

So the missiontypeprops_gc.xml file controls what weapons local forces are going to spawn with, and part of that uses the Ticker value as a flag to determine when the laser upgrade occurs.

First question, what does "inf" mean in relation to the Ticker value?

Second question, is <Ticker value="#"> the only variable this will respond to? Or would it be possible to trigger these upgrades based on some other value, such as the completion status of a particular Research in the tech tree?

Third question, could I add another tier to this where NPCs could spawn with plasma weapons? Because the thing is these stats identify weapon, but they don't identify sprite. I don't mind reusing sprites but I wanted to know if this value signifies both the weapon AND what sprite the local forces use.

<Tileset name="industrial">   <MissionType name="Common" civilianCount="5" friendlyAICount="2">     <FriendlyAI>       <Ticker value="750">     <Weapon percent="70" name="weapon.pistol" />         <Weapon percent="30" name="weapon.shotgun" />       </Ticker>       <Ticker value="inf">         <Weapon percent="75" name="weapon.laserrifle" />         <Weapon percent="25" name="weapon.scatterlaser" />       </Ticker>     </FriendlyAI>   </MissionType> </Tileset>
Edited by DarkExcalibur42
Link to comment
Share on other sites

Can't answer the first question but 2) if you want another trigger, it would need to be coded, and 3) the weapon determines what sprite is used. Each weapon has its own sprite subfolder in the character type. In this case, character type is determined by map type, so to, say, add the plasma rifle you have to add in /units/friendlyaitroops/town/ a /weapon.plasmarifle/ folder, then do that for /units/friendlyaitroops/farm/ etc. etc.

Link to comment
Share on other sites

Can't answer the first question

Something just occurred to me. Is that ticker value the UPPER limit for these loadouts? Ballistic weapons until Ticker Value 750, after which they switch over to Laser weapons until Ticker Value INFINITE is exceeded?

but 2) if you want another trigger, it would need to be coded,

And by coded, I take it you mean what triggers are available is something that's hard-coded into the game? So I'd need to learn Lua or or C++ or something?

and 3) the weapon determines what sprite is used. Each weapon has its own sprite subfolder in the character type. In this case, character type is determined by map type, so to, say, add the plasma rifle you have to add in /units/friendlyaitroops/town/ a /weapon.plasmarifle/ folder, then do that for /units/friendlyaitroops/farm/ etc. etc.

Excellent, so all I'd need to do was add a new sprite folder of the appropriate name and if no plasma sprites are available I could just copy/paste the laser weapon in and it'd still use that sprite.

So where is it coded what weapons the local forces use? Or is that code just double-dipping because weapon.laserrifle is also the name of the item in weapons_gc.xml?

Link to comment
Share on other sites

1) That would make sense. Easy way to test it is to reduce the ticket value.

2) Yes. And become a Community Coder

3) Yes. And.. hm. This is going to take some explaining. The weapon name subfolder needs to match the weapon you want to use in weapons_gc. So, if you want to use the honey badger launcher, you'd need to make sure /units/friendlyaitroops/town/weapons.madbadger/ matched <Weapon name="weapon.madbadger"> and do that for all appropriate /units/friendlyaitroops/foo/ folders. Do you know what spectres are? If you don't, well, I'm about to crash in front of my computer, so look up what spectres are. You'll need to alter each one for the new weapon spritesheets appropriately.

Link to comment
Share on other sites

I don't remotely meet the requirements for becoming a community coder.

I do know what spectres are, or at least I think I do from from reading the mapping tutorials...

But I didn't think it'd be necessary for me to use them in this particular mod concept as all the necessary art assets exist already and would just need to be properly renamed...

Link to comment
Share on other sites

Anyway, this thread has been mostly focused on the how-to question. I may as well describe the why (because I think the why is pretty cool).

I wanted to add Techs to the weapon trees that allowed you to research "mass production" of certain weapons for distribution to Local Forces.

Which would work like this:

Mass-Produced Laser Weapons

Pre-Requisite: Heavy Lasers, Heavy Plasma

Effect; Thanks to the development of our more advanced plasma weapons, we've devised cheaper and more effective means of mass-producing our older laser weaponry. These techniques are being distributed to our allies, who will now weild these weapons in the field! Our own facilities will benefit from this as well.*

And make a similar tech which unlocks Plasma weapons for allies after researching Heavy Plasma & Heavy MAG weapons.

*I don't think it's possible to double-trigger laser weapons, as they're initially unlocked and set to normal upon tech completion and I'm not willing to change that. I COULD double list all the weapons... with the second set being UnlimitedOnResearch... but good god, can you imagine how hideous that'd be? Instead I was thinking of making some sort of multi-role laser weapon which unlocks on research in unlimited numbers. I just thought it'd be neat that once you'd reached some higher tier weapon, the lower tier weapons would just sort of become less significant. And it lets you equip base defenders with "outdated" weapons without having to side-track your production team in building them.

Link to comment
Share on other sites

Let me give you a general description first. A spectre file is a file which describes the properties of a ground combat art asset. This can be any kind of asset - a prop (such as a door), a tile (such as a tin roof or a floor), a spritesheet, an explosion, a bullet... anything! The actual properties will change depending on the type of art asset - a prop is significantly different to a spritesheet. All soldier spectres have been packed up in a specific file archive to reduce the number of files in the game. You need to unpack this archive to get at sample spritesheets and spectres. Lt. Parsons very kindly found a tool for unpacking these archives and made a little program to make it easy. You can find the tool here and a tutorial here.

EDIT: Written in response to DarkExcalibur's first post.

EDIT 2: There are no code hooks to do what you want with mass-produced lasers. That would have to be introduced by a community coder.

Edited by Max_Caine
Link to comment
Share on other sites

Let me give you a general description first. A spectre file is a file which describes the properties of a ground combat art asset. This can be any kind of asset - a prop (such as a door), a tile (such as a tin roof or a floor), a spritesheet, an explosion, a bullet... anything! The actual properties will change depending on the type of art asset - a prop is significantly different to a spritesheet. All soldier spectres have been packed up in a specific file archive to reduce the number of files in the game. You need to unpack this archive to get at sample spritesheets and spectres. Lt. Parsons very kindly found a tool for unpacking these archives and made a little program to make it easy. You can find the tool here and a tutorial here.

Okay, cool. So that'll basically be the same thing which I had to do for the mapping assets! That's not a ... oh crap. Riiiight. Things did not go as planned with the mapping unpack... Hopefully this turns out better!

EDIT 2: There are no code hooks to do what you want with mass-produced lasers. That would have to be introduced by a community coder.

So I'll catalog that as a long-term goal, then. Shame, that. I really enjoy co-operating with the local forces and any fluff or mechanical assistance system is the sort of thing I'd get a huge kick out of. So yeah, supplying weapons to allies via Tech tree isn't doable. But the second half of the idea still works! I could make a lower-grade mass-produced model of laser and plasma weapons for the Xenonauts to use!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...