EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
Errors found in vanilla scripts
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
Browser_ice





Joined: 05 Feb 2006
Posts: 231 on topic

Thank you for registering your game
PostPosted: Sun, 1. Oct 17, 16:26    Post subject: Errors found in vanilla scripts Reply with quote Print

Hi, since there is a patch being tested, I thought this could act as a central place for anyone seeing any error coding in the vanilla scripts.

I found one.

Code:
File mining.ship.collect.xml
line 29-42

      <!-- Move to destination zone -->
      <do_if value="this.ship.zone != $zone">
        <debug_text text="'Go mining to zone: ' + $zone.knownname" chance="$debugchance" />
        <!-- If the zone to mine is a highway -->
        <do_if value="$zone.isclass.highway">
          <debug_text text="'Error moving to %1. This zone is a highway'" />
          <!-- <resume label="start" /> -->
        </do_if>
        <run_script name="'move.generic'">
          <param name="destination" value="$zone"/>
          <param name="endintargetzone" value="true" />
          <param name="debugchance" value="$debugchance"/>
        </run_script>
      </do_if>


explanation:
line 34: missing variable in the debug_text command
Since this is a pretty rare situation to actually happen, probably experienced it.

Found same thing in same file at line 470
      <!-- Move to destination zone -->
      <do_if value="this.ship.zone != $zone">
        <debug_text text="'Go mining to zone: ' + $zone.knownname" chance="$debugchance" />
        <!-- If the zone to mine is a highway -->
        <do_if value="$zone.isclass.highway">
          <debug_text text="'Error moving to %1. This zone is a highway'" />
          <!-- <resume label="start" /> -->
        </do_if>

Found something else at line 513
        <do_if value="$gatherrate" max="0">
          <debug_text text="player.age + ' WARNING: gatherrate for %1 in zone %2 is %4'.[$currentware, $zone.knownname, $gatherrate]" chance="$debugchance" />
        </do_if>

explanation:
Its using %4 when there are no 4th variables in the list. Should be %3


I am not an expert in XR script. I am just beginning. I do know programming. I just have to learn this one while I figure out a few bugs that bugs me.


_________________
Steam X-Superbox, playing XR
WIndows-7
Intel I5
16Gb Memory
Nvgidia GT 960
Back to top
View user's profile Send private message
Browser_ice





Joined: 05 Feb 2006
Posts: 231 on topic

Thank you for registering your game
PostPosted: Sun, 1. Oct 17, 19:51    Post subject: Reply with quote Print

Found what looks to be assumption of one variable to be available when its not. It does not affect the game logic in anyway, just debug informations.

I had a large mining ship with empty cargo. I assigned to my warehouse manager. It mined a bit then unloaded to my warehouse.

Code:
The resulting log events I saw :

[Scripts] 18575.31 *** aicontext<mining.ship.collect,0x11773>: 18575.311 Miner-Large-Gaz(job: '') completed gather-run of HydrogŤne in My Testing Sector. Cargo: [ware.fuelcells,ware.hydrogen]

code for the above:
<debug_text text="player.age + ' %1(job: \'%2\') completed gather-run of %3 in %4. Cargo: %5'.[this.ship.knownname, this.ship.job, $ware, $zone.knownname, this.ship.cargo.list]" chance="$debugchance" />

and a few minutes later:
[Scripts] 18980.28 *** aicontext<mining.ship.station,0x11773>: 18980.28 Miner-Large-Gaz(job: '') unloaded 8000 units of 'HydrogŤne' at 'EntrepŰt I', traderesult:

code for the above:
<debug_text text="player.age + ' %1(job: \'%5\') unloaded %2 units of \'%3\' at \'%4\', traderesult: %5'.[this.ship.knownname, $amount, $currentware, $homebase.knownname, this.ship.job, $traderesult]" chance="$debugchance2" />


Both lines matching those logs were using this.ship.job variable to output but it turns out to be empty. The mining was ordered by the warehouse, so there should be a job associated with that ?


_________________
Steam X-Superbox, playing XR
WIndows-7
Intel I5
16Gb Memory
Nvgidia GT 960
Back to top
View user's profile Send private message
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)

MEDAL

Joined: 20 Nov 2005
Posts: 13677 on topic

Thank you for registering your game
PostPosted: Mon, 2. Oct 17, 02:41    Post subject: Reply with quote Print

regarding Jobs: these are only for non-player ships and regulate the spawning behavior and what the npc Ships do when created. its completely fine that this info is not present for player ships, because these usually dont respawn.


_________________
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 Wink

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help Wink
Back to top
View user's profile Send private message
Sparky Sparkycorp
Moderator (English)
Moderator (English)



Joined: 30 Mar 2004
Posts: 6774 on topic
Location: UK
Thank you for registering your game
PostPosted: Tue, 3. Oct 17, 02:41    Post subject: Reply with quote Print

Hi Browser,

Are these issues related to the 4.10 release version or the 4.21 HF1 beta version?

If you have any mods/save game edits in your game, please could you list them? Could any of them cause these issues?

Thanks in advance,
Sparky


_________________
X:R mod list. X:R Wiki.
Updated TC/AP Bonus Pack. AP TS efficiency.
Back to top
View user's profile Send private message
Browser_ice





Joined: 05 Feb 2006
Posts: 231 on topic

Thank you for registering your game
PostPosted: Tue, 3. Oct 17, 15:52    Post subject: Reply with quote Print

All extension folders have been deleted except for the 2 Egosoft DLCs and mine where I have my log replacements. The save file was a brand new game from that setup.

So I am running a true vanilla version.


_________________
Steam X-Superbox, playing XR
WIndows-7
Intel I5
16Gb Memory
Nvgidia GT 960
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Tue, 14. Aug 18, 15:16

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.08916 seconds, sql queries = 19