Randomized NPC Loadouts
-
Okay, anyone who’s done any sort of serious modding probably knows how much of a pain NPC loadouts can be, especially when it comes to updating them to be compliant with new balance tweaks, etc.
Thus, would it be possible for a plugin that generates NPC loadouts on the fly, based on hp_type definitions in shiparch and a defined pool of equipment available for that faction?
For example, some sort of “equipment_per_faction.ini” could list:
[factionequip]
faction = li_n_grp
li_gun01_mark01
li_gun01_mark02
li_gun01_mark03
li_gun01_mark04
li_gun01_mark05
ge_s_thruster_01
ge_s_thruster_02
li_shield01_mark01
li_shield01_mark02
etc.For each hp_type on the NPC’s ship, the plugin could comb through the list to find the most appropriate fit, perhaps mounting in pairs when multiple hardpoints are available for that hp_type definition. If the hardpoint already has something on it, it’s skipped.
I know this is pretty out there, but an automated NPC loadout system would be pretty awesome.
y/n?
-
This.
Dynamically created loadouts would save so much trouble when changing hundreds of loadouts.
-
If I was to do it, it’d be a lot simpler than that, just adding extra items to the equip lines in the [Loadout] themselves.
equip = li_gun01_mark01, HpWeapon01, 1, li_gun01_mark02, li_gun01_mark03 ```The **1** is the health, used by the original code. The plugin would read the extra values and pick one at random (including the first, of course) when the ship is created. It should also be smart enough to recognise launchers and store the equivalent ammo, provided the **_launcher_** and **_launcher__ammo** convention is used and **cargo** immediately follows **equip**.
-
Cool brainstorm session going here! I’m following it wth much interest and excitement
-
I could also use a generator for random fitting loadouts, for example for a freelancer faction.
-
Not sure I fully understand, you mean whilst the server is running - for flavour and variance? or just when making changes - as in when server not running?
I assume Adoxa is talking about former, for the latter I’d simply program something that reads the file you’ve given, checks out faction_prop for the various potentials, then npcships for what their loadouts and ships are, and then loadouts/shiparch to find the corresponding loadout and ship hardpoints - read them, and then alter accordingly*
So are you looking for something that is for updating a mod whilst it is running, or when it isn’t running?
(the fact I could do it doesn’t translate into would do it… but you never know - depends how bored i am )
- thing to bare in mind is that this would result, unless extra tweaking, with each loadout being the max class for the available hardpoints. Unless you have lots of entries in npcships for different difficulty levels this probably is irrelevant to point out as your differentiation is probably upon the npc pilot’s ability and not the weapons he has.
-
I thought about something that generates me some loadouts to put into a mod, nothing that has to work while the game is running.
-
A tool that generates loadouts would also be nice, especially if the generator could look in the ship’s goods.ini entry first to figure out what power, lights, etc. it needs, and then handles equipment based on the ship’s hp_type entries like suggested above.
Adoxa, your random method of multiple possible equipment per line would also be great, as this would allow modders to mix up NPC loadouts without having to create tens or even hundreds of permutations.
-
I agree with FoxUnit on this one. It could be much easier then making a loadout for every danger-level group and every ship.
adoxa wrote:
The 1 is the healthI don’t think it is the health of the equipped item. What I do know is that it indicates the amount of same items put in your cargo when its on “cargo = …” entry.
-
One thing I’ve always thought was sadly lacking in freelancer was the inability of the game to recognise the level of the player and automatically spawn NPC’s at a similar level, therefore always providing a challenge to the player regardless of the system they are in.
As things stand, once you level up, systems within liberty become pointless, then bretonia, then kusari, then rheinland, until finally the only two systems worth being in are omicron alpha and gamma. Effectively the game kettles players into two systems after a few hours of gameplay rendering 95% of the game useless.
If a method could be found to generate NPC loadouts based on the player characters level, the other 95% of the game would be brought back into play. Obviously it would require missions to be offered based on the player character level also, but it would be mighty fine if you could still play the game in liberty, supposedly the most powerful and advanced of all the houses, when you are maxed out level wise, as opposed to popping them like frogs with sticks of dynamite sticking out of their arses.
-
foxUnit01 wrote:
A tool that generates loadouts would also be nice, especially if the generator could look in the ship’s goods.ini entry first to figure out what power, lights, etc. it needs, and then handles equipment based on the ship’s hp_type entries like suggested above.Adoxa, your random method of multiple possible equipment per line would also be great, as this would allow modders to mix up NPC loadouts without having to create tens or even hundreds of permutations.
I’m confused now
Adoxa’s solution, to me, read like it would be possible to have NPC’s spawning with equipment variations - possibly based upon an external file which specifies what equipment each faction has access to.
I don’t know if that is what he meant (as the original post read to me just like a tool to automatically sort out loadouts for you). My ability would be much much less impressive. Same idea, but static. In other words, you deactivate mod, run tool upon mod, it alters loadouts, you reactivate mod with (hopefully) the loadouts sorted.
As for goods.ini looking - why? That’s for players, which is confusing for me
I didn’t think ahead earlier - I’m not sure I could do this anyway.
I wouldn’t know where to start with reading CMP’s to find out what hardpoints are available for the model, which is the only way I would think of to find non-shiparch related hardpoints (lights, contrails). I would have to rely upon the loadouts file, which can introduce errors made by modders.I guess I can’t help at this point - for several reasons:
-
I wouldn’t know where to start with CMP files, so would need help. Whilst of interest to me the ones who’d have to help could do this themselves 100 times faster without any annoyance or grief from babysitting someone.
-
I don’t know how/what Adoxa is planning/thinking, so if that’s what people would like to see, I wouldn’t have a clue - his understanding is waaay beyond mine.
But I’d enjoy seeing things
-
-
Timmy51m wrote:
One thing I’ve always thought was sadly lacking in freelancer was the inability of the game to recognise the level of the player and automatically spawn NPC’s at a similar level, therefore always providing a challenge to the player regardless of the system they are in.As things stand, once you level up, systems within liberty become pointless, then bretonia, then kusari, then rheinland, until finally the only two systems worth being in are omicron alpha and gamma. Effectively the game kettles players into two systems after a few hours of gameplay rendering 95% of the game useless.
If a method could be found to generate NPC loadouts based on the player characters level, the other 95% of the game would be brought back into play. Obviously it would require missions to be offered based on the player character level also, but it would be mighty fine if you could still play the game in liberty, supposedly the most powerful and advanced of all the houses, when you are maxed out level wise, as opposed to popping them like frogs with sticks of dynamite sticking out of their arses.
You can generate dynamic encounters whereby all systems have ships from level 1 all the way up to level 19. That’s more realistic and practical than your proposed solution, too, since it makes sense for all kinds of people to be around, rookies and veterans alike, and that it’d be impossible to do what you’re saying with two players of very disparate levels in the same area. Instead, it’s just a matter of setting up the spawn zones so that certain areas spawn more low-level NPCs than others for newbies to fly around in. It’s much more flexible than the default FL system for sure.
Remember level scaling works in the likes of Oblivion because you’re alone in the world.
-
You’re right, I can see that now. That’s what I get for only playing single player, failing to see the impact of such a system in multiplayer.
Maybe an easy solution would be to just duplicate all the systems and set them up as level 18-19 systems. Kind of like a parallel universe. Once you level right up just wander over into the alt universe.
-
Unless you force people away (which would cause other issues like not being able to help your new friend without forcing yourself into a newbie character), you can be sure traders would exploit this alternate universe concept by always going in the newbie mode so as to avoid danger.
Multiplayer’s complicated, isn’t it?
-
@Chips: Fox said “plugin” and “on the fly”, a fair indication he meant while the server was running.
@Fox: Your request is just way too complicated, hence my alternative. I’ve thought of another two ways of doing it - multiple loadouts in [NPCShipArch] (loadout = li_n_li_elite_loadout01, li_n_li_elite_loadout02, li_n_li_elite_loadout03) and/or groups within [Loadout].
; all the common stuff before this group ; let the plugin know ; Outcast loadout equip = fc_ou_gun01_mark03, HpWeapon01 equip = fc_ou_gun01_mark03, HpWeapon02 equip = fc_ou_gun01_mark03, HpWeapon03 equip = fc_ou_gun01_mark02, HpWeapon04 equip = fc_ou_gun01_mark02, HpWeapon05 equip = missile01_mark01, HpWeapon06 cargo = missile01_mark01_ammo, 8 equip = fc_ou_turret01_mark01, HpTurret01 group ; Corsair loadout equip = fc_c_gun01_mark03, HpWeapon01 equip = fc_c_gun01_mark03, HpWeapon02 equip = fc_c_gun01_mark03, HpWeapon03 equip = fc_c_gun01_mark03, HpWeapon04 equip = fc_c_gun01_mark02, HpWeapon05 equip = fc_c_gun01_mark02, HpWeapon06 equip = fc_c_turret01_mark01, HpTurret01 group ; now the plugin can choose a random, but consistent, loadout ; all the common stuff after this ```Could probably still do the individual random equip items within each group, too.
-
FriendlyFire wrote:
Unless you force people away (which would cause other issues like not being able to help your new friend without forcing yourself into a newbie character), you can be sure traders would exploit this alternate universe concept by always going in the newbie mode so as to avoid danger.Multiplayer’s complicated, isn’t it?
No #$%%!
-
adoxa wrote:
@Chips: Fox said “plugin” and “on the fly”, a fair indication he meant while the server was running.Ah sorry,my mistake, I was assuming he meant mod makers…not server operators.
I was assuming a universal method of making mods - via FLMM, whereby changes made on the fly on the running game aren’t reflected within the files stored within FLMM (traditionally what the mod maker distributes yes?)… so you’d still have to mess about with loadouts afterwards in the original files.
Hence the questions.
Of course for server operators then a plugin to indefinitely tweak loadouts is perfect And seeing who makes mods these days, I guess server operator/mod maker is the same thing
-
Adoxa, any of your methods would be a great improvement. I personally think your first method would be best overall, as it would allow minor equipment decisions - such as choices between thrusters, shields, etc. to be made concurrently. For mods where equipment is intended to be balanced on a level field (such as having weak shields offline for a lower amount of time, or higher-damage weaponry being less accurate), being able to mix up NPC loadouts like that would be a huge plus to the PvE experience.
Also, if you were able to have the option to pair equipment selections for similar lists, that’d be great. In other words:
equip = fc_ou_gun01_mark03, HpWeapon01, 1, fc_ou_gun01_mark02, fc_ou_gun01_mark01 equip = same_as_previous, HpWeapon02, 1 equip = fc_ou_gun01_mark03, HpWeapon03, 1, fc_ou_gun01_mark02, fc_ou_gun01_mark01 equip = same_as_previous, HpWeapon04, 1 ```When the plugin encountered same_as_previous, it would mount the same equipment chosen for the previous selection. This random loadout would then generate 2 pairs of selections, instead of 4 individual selections. Now, as for automated loadout generation from the ground up, I suppose that wouldn't need to happen in-game - a standalone tool independent of the game would be great.