[MOD] Skillex

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

BlueWulv
Posts: 238
Joined: Sat, 7. Feb 04, 17:06
x4

[MOD] Skillex

Post by BlueWulv »

Download:
http://xrebirth.nexusmods.com/mods/289/?


Hi everyone

here is a small mod I just released to get rid of the annoying NPCs' skill safari.

If you don't even want to enter a station have a look for NESA.
Thanks to Mad_Joker for the skill revealing code.


What does this mod do?

- reveal skills of a NPC on conversation start
- ensure main skills have not less than 1 star
- ensures morale will have a minimum of 1 star (with chances to boost it to 2 or 3 stars)


More to come:
- improve NPC mini game situation
- change the calculation of hire costs


Known issues:
- I am not sure about specialists, they are...special xD
=> there is a marine, an architect etc. but no "Agrar specialist", they are all just specialists, so I am not quite sure what their main skills are and how to detect what kind of specialst a NPC is


FAQ
1) Will this mod improve the stats of NPCs whose skill are already revealed?
- No.
2) Will you change the mod to improve the skills of NPCs whose skills are already revealed?
- I could, but I am not sure I should. There could be cases where the skill level only matters at the point the NPC was assigned to its current job etc.
3) Is this mod compatbile with NESA?
- With a config change to NESA it is: Disable "Reveal NPC Skills"
4) Patch 1.18 will have: "Improved skill levels for new NPCs."
If someone has some more specific info about this it would be very much appreciated. Will have a look, maybe there are changes within the aiscript/md files.
Last edited by BlueWulv on Fri, 29. Nov 13, 23:31, edited 6 times in total.
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi »

What does morale effect? Or do we not know yet?
MOD XR Show Skills

Flying spaceships since 1993.
BlueWulv
Posts: 238
Joined: Sat, 7. Feb 04, 17:06
x4

Post by BlueWulv »

As we do not have the full insight what is happening behind the scenes it could do nothing.

But the developers have left some clues what they had planned:

Found these in ai scripts related to fighting
<!-- TODO: compare DPS/attackstrength values, also take additional values into account, like fight skill and morale -->
<!-- TODO: modify chance value based on current hull/shield strength, attacker firepower, pilot morale etc. -->

EDIT:
And some mods do already use the morale skill

EDIT2:
To be more clear, within the vanilla AI and MD files are currently no uses of the morale skill
BlueWulv
Posts: 238
Joined: Sat, 7. Feb 04, 17:06
x4

Post by BlueWulv »

Checked 1.18 beta patch.

characters.xml

Code: Select all

  <character id="specialist_albion_random" [...]

    <skills>
      <skill type="boarding" min="0" max="3" profile="flat"/>
      <skill type="combat" min="0" max="3" profile="flat"/>
      <skill type="engineering" min="2" max="5" profile="increasing"/>
      <skill type="leadership" min="1" max="4" profile="bell"/>
      <skill type="management" min="1" max="4" profile="bell"/>
      <skill type="morale" min="0" max="3" profile="flat"/>
      <skill type="navigation" min="1" max="4" profile="bell"/>
      <skill type="science" min="2" max="5" profile="increasing"/>
    </skills>
  </character>
[...]
  <character id="pmc_specialist_trader" group="albion.specialengineer">
[...]
    <owner exact="plutarch"/>
    <skills>
      <skill type="boarding" min="0" max="3" profile="flat"/>
      <skill type="combat" min="0" max="3" profile="flat"/>
      <skill type="engineering" min="2" max="5" profile="increasing"/>
      <skill type="leadership" min="1" max="4" profile="bell"/>
      <skill type="management" min="1" max="4" profile="bell"/>
      <skill type="morale" min="0" max="3" profile="flat"/>
      <skill type="navigation" min="1" max="4" profile="bell"/>
      <skill type="science" min="2" max="5" profile="increasing"/>
    </skills>
  </character>

[...]
  <character id="specialist_omicron_lyrae_random" group="argon.specialengineer">
[...]
    <skills>
      <skill type="boarding" min="0" max="3" profile="flat"/>
      <skill type="combat" min="0" max="3" profile="flat"/>
      <skill type="engineering" min="2" max="5" profile="increasing"/>
      <skill type="leadership" min="1" max="4" profile="bell"/>
      <skill type="management" min="1" max="4" profile="bell"/>
      <skill type="morale" min="0" max="3" profile="flat"/>
      <skill type="navigation" min="1" max="4" profile="bell"/>
      <skill type="science" min="2" max="5" profile="increasing"/>
    </skills>
  </character>
[...]
  <character id="canteran_specialist" group="devries.specialengineer">
[...]
    <owner exact="canteran"/>
    <skills>
      <skill type="boarding" min="0" max="3" profile="flat"/>
      <skill type="combat" min="0" max="3" profile="flat"/>
      <skill type="engineering" min="2" max="5" profile="increasing"/>
      <skill type="leadership" min="1" max="4" profile="bell"/>
      <skill type="management" min="1" max="4" profile="bell"/>
      <skill type="morale" min="0" max="3" profile="flat"/>
      <skill type="navigation" min="1" max="4" profile="bell"/>
      <skill type="science" min="2" max="5" profile="increasing"/>
    </skills>
  </character>

common.xsd, createnpc changed,

from:
<xs:attributeGroup ref="range" />
to:
<xs:attributeGroup ref="random" />

Code: Select all

shortened
              <xs:element name="skill">
                    Skill (number of stars, between 0 and 5)
                  </xs:documentation>
             
                <xs:complexType>
                  <xs:attributeGroup ref="random" />
                  <xs:attribute name="type" type="entityskilllookup">
                    <xs:annotation>
                      <xs:documentation>
                        Skill type
                      </xs:documentation>
quotas.xml - very interesting

Code: Select all

[...]
  <!-- ALBION -->
  <cluster macro="cluster_b_macro">
    <actors>
      <!-- BAR GROUP -->
      <actor type="architect" weight="50">
        <dock type="bar" weight="130"/>
        <dock type="ships" weight="130"/>
        <character group="albion.architect">
          <owner selection="random">
            <select exact="albionenergy" weight="60"/>
            <select exact="beryll" weight="20"/>
            <select exact="heartofalbion" weight="30"/>
            <select exact="leddaindustrial" weight="50"/>
            <select exact="nolimits" weight="20"/>
            <select exact="plutarch" weight="80"/>
            <select exact="wholesomefoods" weight="40"/>
          </owner>
          <skills>
            <skill type="boarding" min="0" max="3" profile="flat"/>
            <skill type="combat" min="0" max="3" profile="flat"/>
            <skill type="engineering" min="2" max="5" profile="increasing"/>
            <skill type="leadership" min="1" max="4" profile="bell"/>
            <skill type="management" min="2" max="5" profile="increasing"/>
            <skill type="morale" min="1" max="4" profile="bell"/>
            <skill type="navigation" min="2" max="5" profile="increasing"/>
            <skill type="science" min="1" max="4" profile="bell"/>
          </skills>
        </character>
[...]

EDIT/2:
So that's exactly what we have been looking for. [deleted wrong assumption here]
Set min /max and the profiles for the probability distribution.
Last edited by BlueWulv on Sat, 30. Nov 13, 11:00, edited 1 time in total.
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi »

So now you can say random but a min of 1 and a max of say 4 but increasing ? IE get a Captain with a 2 Navigation but it can increase over time to 5?
MOD XR Show Skills

Flying spaceships since 1993.
BlueWulv
Posts: 238
Joined: Sat, 7. Feb 04, 17:06
x4

Post by BlueWulv »

I would say so, but it's totally speculative...
And it is probably still in development and not fully implemented when 1.18 will be released.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

profile in above seems to be talking about what kind of randomization is used in the values. The clue is that one of the options is Bell, like a bell curve.

At a guess here is how I would translate them.

flat: equal chance of all possible values
increasing: higher values more likely than lower values.
bell: Median value more likely than higher or lower values, extreme values either way most unlikely.

So reading the albion.specialengineer skills I see

boarding 0-3 equally likely
combat 0-3 equally likely
engineering 2 to 5, higher values more likely than lower
leadership 1-4: most likely 2-3, 1 and 4 relatively unlikely
Management 1-4: same as leadership
Morale 0-3 equally likely
Nav 1-4: same as leadership and Management
science 2-5: higher values more likely.

In english Science and Engineering are core skills and likely to have high values, Leadership Management and Navigation are secondary and can reach decent levels, but more likely to be average. Combat, boarding and morale are non-job skills and will never be more than average.
NBCDumb
Posts: 246
Joined: Fri, 7. Nov 08, 10:47
x4

Post by NBCDumb »

Kierk wrote: At a guess here is how I would translate them.

flat: equal chance of all possible values
increasing: higher values more likely than lower values.
bell: Median value more likely than higher or lower values, extreme values either way most unlikely.
Yes, that's how it worked in X3AP. There is also decreasing. I think there is also the contrary of bell but can't remember the function name.
BlueWulv
Posts: 238
Joined: Sat, 7. Feb 04, 17:06
x4

Post by BlueWulv »

Ah, yeah, that totally makes sense now (bell curve would be Glockenkurve in German) :)

So there is massive boost for the skills.
Hmmm, I would prefer lower skills which would increase over time or by paid training lessons.

Contrary of bell could be "well" would not use it for skills though :)

Return to “X Rebirth - Scripts and Modding”