[Mod] Show Skills

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

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

wwdragon
Posts: 3746
Joined: Mon, 1. Oct 07, 02:18
x4

Post by wwdragon » Fri, 14. Nov 14, 20:38

StormMagi wrote:Going to wait and see once 3.00 is out.
Ok. :-)
Editing posts since long before I remember.

User avatar
werewolves?
Posts: 1166
Joined: Tue, 31. Jan 12, 00:58
x4

Post by werewolves? » Fri, 14. Nov 14, 21:52

Works again. :D

wwdragon
Posts: 3746
Joined: Mon, 1. Oct 07, 02:18
x4

Post by wwdragon » Sun, 16. Nov 14, 22:40

werewolves? wrote:Works again. :D
:D
Editing posts since long before I remember.

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Sat, 13. Dec 14, 06:43

Anyone having any trouble with this mod? I have one report via steam that it stops the engineer from repairing modules... (that is all they said so far). I haven't had time to play X:R lately but that should change come Sunday/Monday
MOD XR Show Skills

Flying spaceships since 1993.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 13. Dec 14, 11:18

Seems to be working fine. But if there's a conflict with characters (captains, pilots, defence officers, engineers, etc.) who work for the player, adding this:

Code: Select all

        <check_value value="event.param.owner != faction.player"/>
to the conditions SHOULD keep the script from running at all for player-owned entities. It will prevent you from looking up the skills of people who already work for you, though. Haven't tested it since I haven't encountered the engineer bug.

edit: sorry, spoke too soon. "Show me your skills" still appears when talking to characters in the back of the Skunk.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 13. Dec 14, 13:50

Been fiddling with the script for a bit, and getting nowhere, when I thought to run the game in pure vanilla.

If I understand the problem correctly, it is that Engineers working for faction.player who are assigned to different ships do not give the option to repair the Skunk when spoken to. This change appears to have been done in vanilla, and the Showskills.xml script in this mod does not interfere with that in any way. That is, we are now no longer able to ask Engineers working for us to repair the Skunk, the way we could ask, say, an NPC Engineer in a Station. Also, the option to ask NPCs to "show me your skills, please." are now always present. Can't remember if it was always like that, since I've been playing with the Show Skills mod active since v2.50.

That said, an Engineer assigned to the Skunk should repair the Skunk as normal within the limits set by the game. (up to 90% hull for a 5-star Engineer, not sure if modules are repaired by default as well anymore since the Skunk can no longer acquire construction drones.)

Engineers working for faction.player, but who are assigned to different ships, will repair the ships they are assigned to, but cannot be asked to repair the Skunk. Again, this appears to be working as intended as set by vanilla X-Rebirth.

ty_cho
Posts: 206
Joined: Tue, 20. Nov 07, 06:39
x3tc

Post by ty_cho » Sat, 13. Dec 14, 17:49

w.evans wrote:That said, an Engineer assigned to the Skunk should repair the Skunk as normal within the limits set by the game. (up to 90% hull for a 5-star Engineer, not sure if modules are repaired by default as well anymore since the Skunk can no longer acquire construction drones.)
I've never once bought construction drones for the skunk (2.0, 2.5, 3.0 betas), the engineer has always repaired the hull and modules very quickly, even in the middle of combat. I don't think they were ever needed/used, which is why they removed the option to buy them for the skunk.

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Sun, 14. Dec 14, 01:03

OK I will play around with that scenario to start then. Get in fight with engineer on board with mod/vanilla and see what happens.

If something is broken though I will (as mentioned before) need help fixing it or I can just pass on the mod to whoever wants to take it over since I just published it.
MOD XR Show Skills

Flying spaceships since 1993.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sun, 14. Dec 14, 15:28

I'd gladly help, but I must say that I'm not all that experienced in xml scripting in general, and in md scripting in particular.

That said, the code looks fine.

I think that this line:

Code: Select all

        <show_help force="true" chance="0" custom="'Revealed skills of NPC %1 (%2), distance=%3, combinedskill=%4'.[event.object, event.object.knownname, event.object.distanceto.{player.entity}, event.object.combinedskill]" />
in [/mdscript/cues/cue/actions] is redundant though. Tried running the game with that line commented out, and it worked fine.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sun, 14. Dec 14, 16:51

w.evans wrote:I'd gladly help, but I must say that I'm not all that experienced in xml scripting in general, and in md scripting in particular.

That said, the code looks fine.

I think that this line:

Code: Select all

        <show_help force="true" chance="0" custom="'Revealed skills of NPC %1 (%2), distance=%3, combinedskill=%4'.[event.object, event.object.knownname, event.object.distanceto.{player.entity}, event.object.combinedskill]" />
in [/mdscript/cues/cue/actions] is redundant though. Tried running the game with that line commented out, and it worked fine.
this is just for displaying a hint/notice that the Skills of an NPC are now set to known, it doesnt have anything to do with the actual functionality ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Sun, 14. Dec 14, 20:59

This was the message from the Steam user:
Arcast 3 hours ago
I only had two mods installed, yours and Capital Ships Bridge. An engineer aboard my Arawn was stuck on analysing components so i suspected one of the mods. I disabled them and the engineer started repairing. I enabled them both and the issue was back. So I disbled Show Skills and the engineer started repairing again.


I had to reinstall XR since a number of things were acting up. I will be testing the Skunk w/ Engineer hopefully today but no later than tomorrow.

Also if it helps I can post the entire mod code here in the thread for easy troubleshooting :P
MOD XR Show Skills

Flying spaceships since 1993.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sun, 14. Dec 14, 21:57

I can't see how though. The only actions present in this mod are:

Code: Select all

      <actions> 
        <set_skills_visible entity="event.object" visible="true" /> 

        <show_help force="true" chance="0" custom="'Revealed skills of NPC %1 (%2), distance=%3, combinedskill=%4'.[event.object, event.object.knownname, event.object.distanceto.{player.entity}, event.object.combinedskill]" />

        <reset_cue cue="this" /> 
      </actions> 
The first action sets the visibility of the skills of the person you're talking with to "true."

The second is redundant, but all it does, according to UniTrader, is to provide a hint that the skills of a given NPC are known.

And the third resets the script.

The rest of the mod are conditions to make sure that the target of the mod is valid. I must say, very solidly written. And I really can't see anything that might cause the problem described. Don't doubt that it happened, but have no explanation nor solution for it, I'm afraid.

edit: Sorry. Meant the skills of the person you're talking with. Of course the visibility of the person is "true." Would be interesting if that could be set to "false" though.
Last edited by w.evans on Mon, 15. Dec 14, 00:20, edited 2 times in total.

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Sun, 14. Dec 14, 22:41

Well when I fired up XR yesterday I couldn't talk to any of the NPCs I hired at all, even w/o the mod. Did a fresh install today so will be testing from a stock scenario start.
MOD XR Show Skills

Flying spaceships since 1993.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sun, 14. Dec 14, 22:43

StormMagi wrote:Well when I fired up XR yesterday I couldn't talk to any of the NPCs I hired at all, even w/o the mod. Did a fresh install today so will be testing from a stock scenario start.
what was the last NPC you talked to? CBJ mentoined somewhere else that this happens if a conversation is not proerly terminated..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Sun, 14. Dec 14, 22:46

I don't recall TBH and I already deleted that save set since I forgot what I was doing. I logged into the Skunk, went to crew quarters and none of the npcs would talk to me so I landed and could talk to other npcs just fine. Boarded Skunk again and still nada, couldn't even comm the crew on my plot Rahanas.
MOD XR Show Skills

Flying spaceships since 1993.

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Mon, 15. Dec 14, 01:14

I honestly don't know how, but I did verify that having Show Skills running does prevent/interrupt (if it is already running and you activate the mod) the engineer repair process.

Will contact Mad_Joker to see if he/she is willing to help update the mod.
Last edited by StormMagi on Mon, 15. Dec 14, 01:34, edited 1 time in total.
MOD XR Show Skills

Flying spaceships since 1993.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Mon, 15. Dec 14, 01:18

Have you tried testing it with the second action commented out? Can't see how it should cause what's happening, but it shouldn't be necessary, so might as well.

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Mon, 15. Dec 14, 01:35

No I haven't. I can try but as I mentioned earlier in the thread I published this mod with permission but didn't write it.
MOD XR Show Skills

Flying spaceships since 1993.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Mon, 15. Dec 14, 01:42

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	This file is part of the X Rebirth ShowSkills mod.
	The code was mostly copied from the NESA mod with 
	permission of the author Mad_Joker.
	
	Author: StormMagi
  
	Last Change:
	Version: V1.0
	Date: 28th Nov 2013
  
	X Rebirth version: 1.17
-->
<mdscript name="ShowSkills" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../modding/md.xsd"> 
  <cues>
    <!-- 
        Cue to reveal skills. 
     --> 
    <cue name="SectionHandler_ShowSkills_RevealSkills" instantiate="false" namespace="this"> 
      <conditions> 
        <check_all> 
          <event_conversation_started />          
          <!-- We ignore opening of the main menu (which is a conversation with Yisha) --> 
          <check_value value="event.object" exact="player.copilot" negate="true" /> 
          <!-- Only specific NPC types have skills --> 
          <set_value name="$lSuitableTypes" exact="[entitytype.pilot, entitytype.commander, entitytype.manager, entitytype.engineer, entitytype.architect, entitytype.marine, entitytype.defencecontrol]" /> 
          <!-- some checks, mostly copied from Smalltalk.xml --> 
          <check_value value="event.object.page and (event.object.isspecialist or not event.object.iscontrolentity) and not event.object.skillsvisible" exact="true" /> 
          <check_value value="event.object.isspecialist or $lSuitableTypes.indexof.{event.object.type}" exact="true" /> 
        </check_all> 
      </conditions> 
      <actions> 
        <!-- finally, we can set the skills to be visible --> 
        <set_skills_visible entity="event.object" visible="true" /> 
        <!-- <show_help force="true" chance="0" custom="'Revealed skills of NPC %1 (%2), distance=%3, combinedskill=%4'.[event.object, event.object.knownname, event.object.distanceto.{player.entity}, event.object.combinedskill]" />  -->

        <!-- we reset the cue to make sure we can trigger it again --> 
        <reset_cue cue="this" /> 
      </actions> 
    </cue>
  </cues> 
</mdscript> 
Hope that helps.

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi » Mon, 15. Dec 14, 02:31

Will copy and run that then.

Doesn't effect anything. From what I can observe, the script is preventing the engineer from launching and(or) issueing orders to Construction URVs to begin repair. If the script is started mid repair the Con. URVs just fly around without any orders (they drop w/e orders they had) but still belong to the ship.

At least for other ships, every time i try to test w/ the Skunk I manage to kill myself XD
MOD XR Show Skills

Flying spaceships since 1993.

Post Reply

Return to “X Rebirth - Scripts and Modding”