EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[Official Mod Development Bug Reports] A Thread for Mod Creators
Post new topic Reply to topic Goto page 1, 2, 3 ... 14, 15, 16  Next
View previous topic :: View next topic
Author Message
j.harshaw
EGOSOFT
EGOSOFT



Joined: 23 Nov 2015



modified
PostPosted: Tue, 24. Nov 15, 13:10    Post subject: [Official Mod Development Bug Reports] A Thread for Mod Creators Reply with quote Print

We recognize that feedback from modders can be invaluable in tracing problems and finding opportunities with the code. As such, we would like to open this thread for modders to report problems encountered over the course of mod development. Things such as:
  • repro cases of commands causing crashes or freezes,
  • commands not doing things you expect them to,
  • unforeseen limitations,
  • or unexpected changes in how commands behave between updates

would be of particular value.

Please limit reports to:
  • concise code snippet(s) that would suffice to illustrate a problem,
  • in addition to a description of what went wrong or how it could be improved,
  • and the version of the game where the problem was encountered.

A link to the mod where the snippet was taken from, or a discussion of the problem in detail, would also be useful for closer inspection.
A link to a save game if it would help to reliably reproduce an issue would also be appreciated.

That said, please do bear in mind that we have a small team, and priority remains in working on making the vanilla game better.

Maintenance of mods are still the responsibility of modders. As such, mod users who encounter problems should still post reports in the respective mod threads. This saves us time by keeping our attention on the vanilla code, saves modders time by not having to look in different places for reports or feedback that might be related to their mods, and should result in you getting a better game faster.

And please do bear in mind that this is not a modding tutorial thread. Resources for that are available in the X Rebirth Tools, Tutorials, and Resources thread in the X Rebirth Scripts and Modding forum.

_____
PROGRESS REPORT:

1) No way to keep track of mass traffic networks launched from one entity onto another. - w.e

- being investigated

.......
2) <add_buy_order/> and <add_sell_order/> moves money between the player's account and the captain's/manager's/architect's even if the entity is not directly subordinate to the player. - UniTrader

- functionality will change in an upcoming build
BurnIt! wrote:
the code will be changed to always use the account of the commanderentity - for player ships in the player squad or without any commander that will be the player, so everything works as before.
For ships assigned to a Manager that will be the Manager. For ships assigned to the Defence Officer it will be the DO etc.

WARNING: if the commander entity does not have it's own account (typically the case for a Defence Officer or Captain/Pilot of a ship not currently trading) it would still default to the faction account which means player owned ships assigned to any such entity would still use the player account for money transfers! (see script property $entity.hasownaccount)


.......
3) When using <create_ship/> to create a ship with a defined basket, scripts acting on that ship do not recognize the basket. - Clownmug

- working as intended - While the "basket" property can be used with create_ship to spawn wares upon ship creation, the basket as an actual ware basket for later script reference is only used for job ships.

.......
4) "{1001,101} Cr" in move.refuel is read in twice before printing to logbook, thus printing "$amount Cr Cr" - jth

- FIXED in an upcoming build

.......
5) Reservation handling like get_ware_reservation does not distinguish between incoming and outgoing trades. - Marvin Martian

- CHANGED as of 4.0 Beta 4 HF2

http://forum.egosoft.com/viewtopic.php?t=366346

.......
6) Using a certain number of components in a crafting recipe prohibits using a different number of components in a different recipe. - oliverjanda

- FIXED in an upcoming build

.......
7) Loading game via "Continue" does not appear to trigger <event_game_loaded/> - oliverjanda

- working properly as of 4.00 Beta 3

.......
8 ) Using unrecognized characters causes corrupted save. - UniTrader

- FIXED as of 4.00 Beta 4 HF 1

.......
9) Reset of mass traffic between save-load cycles causes loss of wares. - Marvin Martian

- working as intended - Mass traffic elements are generated upon game load, but wares within a mass traffic network are written into the save file, and are transferred normally upon game load.

.......
10) When using <move_to boost="true"/>, ships start boosting immediately rather than rotating into a good orientation before boosting. - Marvin Martian

- MM confirmed that it works for flightcontrolmodel.spline

clarification: <move_to boost="true"/> does only boost if it has a straight-line path and the way is unobstructed. This means that rather than the old behavior where ships about to boost stop and turn before boosting, they'll turn and maneouver the way they normally do until it is safe to boost, and will do so only in that case.

HOWEVER, ships will only do so if they are using flightcontrolmodel.spline. This is the default flight control model, so if this is not overridden by either specifying a different fcm, or using forcesteering="true" ships will use this.

Important note about forcesteering: if forcesteering is set to true at ANY point in the controlling entity's (usually captain or pilot) history, fcm is changed, even if forcesteering is later set to "false." In this case, setting fcm back to spline by using
Code:
<set_flight_control_model object="$ship" flightcontrolmodel="flightcontrolmodel.spline"/>

should get them back on using fcm spline.

In any other flight control model, ships are much less selective about when to boost, and will tend to do so immediately when the move_to is called.

@Adrian, if any of this is wrong, please feel free to correct.

@Marvin, thanks for the report, and for testing and confirming that it works as described.

.......
11) Plot-triggered station construction in DeVries does not begin until player is in-zone. - YorrickVander

- being investigated

.......
12) Stations constructed in DeVries via plot-trigger do not upgrade, so do not have shields nor turrets. - YorrickVander

- being investigated

.......
13) Vile lua stuff Razz - jth

- FIXED

_____
Thank you for your reports thus far!

If you have reported what appears to be a problem, and it does not appear on this list, or if I didn't summarize a problem you reported correctly, please let me know.

If a reported issue appears unaddressed, and has been marked as addressed, I probably screwed up and didn't understand what the problem was in the first place. In such a case, please do not hesitate to let me know -- either on this thread or via PM.



Last edited by j.harshaw on Thu, 21. Jan 16, 23:09; edited 29 times in total
Back to top
View user's profile Send private message
j.harshaw
EGOSOFT
EGOSOFT



Joined: 23 Nov 2015



PostPosted: Tue, 24. Nov 15, 15:37    Post subject: Reply with quote Print

Sample report:

Problem: Since mass-traffic IDs appear to be dynamically assigned per save-reload cycle, there appears to be no way to keep track of mass-traffic networks launched from one entity onto another between save-reload cycles.

Code:

vanilla from engineer.ai
Code:
<launch_repair_drones object="$Defensible" target="$Defensible" components="$MassTrafficTargets" result="$networkid"/>


modified code:
Code:
<launch_repair_drones object="this.defensible" target="$Defensible" components="$MassTrafficTargets" result="$networkid"/>


Mod: Mod using this code has not been published due to the problem remaining unresolved. Detailed discussion available here:

http://forum.egosoft.com/viewtopic.php?t=383114

Last tested with X Rebirth 3.61 release.

Suggest low priority due to this situation not occurring in vanilla.

Back to top
View user's profile Send private message
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)

MEDAL

Joined: 20 Nov 2005
Posts: 13529 on topic

Thank you for registering your game
PostPosted: Tue, 24. Nov 15, 19:21    Post subject: Reply with quote Print

got some things where i have to work around a bit (or which i find useful):

1. To be honest not really in the Scope of this, but anyway:
add the possibility to include Custom Hotkeys (best with AI/MD Events which catch them)
had to say that Very Happy possibilities for this are unlimited Wink (especially for testing stuff)



2. Unexpected behavior:
<add_trade_order/> and <remove_trade_order/>
both Commands transfer Money from/to the Player Entity to/from the Captain/(this?) even if the Ship works for someone else (i like how these display Info about planned Trade in the Info Menu as Player feedback) - really annoying if i have to keep track how much Money the Captain has in his account to avoid unnecesary Money Transfers by transferring the exactly right amount beforehand.
Suggestion: add an optional Parameter like @transferaccount to specify an Entity whose Account should be used instead of the Player account to transfer needed/surplus Money ( player stays is default if not specified), and if a null value is passed dont transfer Money at all

I think this explaination is clear enough, but if necesary i will provide some example Code

low priority since its not an Issue for Vanilla Gameplay



3. hmm.. thought it was more, but nothing in my current major Project Surprised will look through my other stuff, i am sure there were some things i had to work around, but dont remember them anymore..


_________________
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
Marvin Martian





Joined: 08 Apr 2012
Posts: 2339 on topic

Thank you for registering your game
PostPosted: Tue, 24. Nov 15, 19:38    Post subject: Reply with quote Print

about <dependency /> of addons
i can't find any further conditions in the xsd description about make them optional

but it would be helpfull beside of fully optionally dependencies, simply to use conditions like
Code:
<check_any>
   <dependency id="ws_0815" version="120" />
   <dependency id="foo_bar" version="120" />
</check_any>
<dependency id="bar_foo" negate="true"/>

to prevent loading if another Mod is active, and/or if there are diffrent IDs at workshop and some other sources

Back to top
View user's profile Send private message
Clownmug





Joined: 11 Dec 2013
Posts: 170 on topic

Thank you for registering your game
PostPosted: Wed, 25. Nov 15, 00:38    Post subject: Reply with quote Print

I ran into two issues recently while working on my Random Universe mod and using version 4.00 Beta 3.

First Issue
The "mining.ship.free" aiscript doesn't use the basket defined from "<create_ship>", I have to use the "basketoverride" param. If I don't use it, the mining ship will end up running "move.die" because it doesn't see the basket.

Code:

Example mining ship:
<create_ship name="$MinerShip" macro="[macro.units_size_m_ions_collector_macro,macro.units_size_m_hydrogen_collector_macro].random" zone="$Zone">
   <owner exact="$ShipFaction" overridenpc="true"/>
   <pilot>
      <select faction="$ShipFaction" tags="[tag.pilot]"/>
   </pilot>
   <units>
      <unit category="unitcategory.gascollector" mk="2" exact="3" />
   </units>
   <cargo>
      <wares basket="gases">
         <fillpercent min="20" max="30"/>
      </wares>
   </cargo>
   <basket basket="gases"/>
   <safepos x="$x" y="$y" z="$z" />
</create_ship>

OK:
<start_script object="$MinerShip.pilot" name="'mining.ship.free'">
   <param name="basketoverride" value="[ware.hydrogen,ware.ions,ware.plasma]"/>
</start_script>

Not OK:
<start_script object="$MinerShip.pilot" name="'mining.ship.free'"/>


Second Issue
When getting the name property of a ship, their faction's abbreviation is included. Also, if you use <set_object_name> the faction abbreviation is removed.

Code:

Example:
<set_object_name object="$PMC_Taranis" name="'Warden Destroyer' + ' ' + $PMC_Taranis.name"/>

Result:
Warden Destroyer PMC Taranis


Code:

Example:
<set_object_name object="$PMC_Taranis" name="'Warden Destroyer' + ' ' + $PMC_Taranis.macro.name"/>

Result:
Warden Destroyer Taranis (No abbreviation shown on zone map)


Back to top
View user's profile Send private message
jth



MEDAL

Joined: 04 Jan 2006
Posts: 295 on topic
Location: England
Thank you for registering your game
PostPosted: Wed, 25. Nov 15, 13:38    Post subject: move.refuel Transferred $MONEY$ Cr Cr to $ENTITY$ ... Reply with quote Print

From the aiscript move.refuel.xml around line 139 in version 3.61

Code:
        <do_if value="$accountholder == player.entity">
          <!-- send notification that money is being used for re-fueling -->
          <set_value name="$moneytext" exact="'%1 %2'.[(($tradeoffer.unitprice * $amount) / 1Cr)i, {1001,101}]" />
          <show_notification caption="{1015,34}" comment="Transferring funds for refueling" sound="notification_generic"
                             details="[
                                        [ null, this.ship.name, this.sector.name ],
                                        [ ware.fuelcells.icon, ware.fuelcells.name, {1001,1202} + {1001,120}, null, null, $amount ],
                                        [ null, {1001,2000}, {1001,1202} + {1001,120}, null, null, $moneytext ]
                                      ]" />
          <substitute_text text="$logtext" source="{1016,15}" comment="Transferred $MONEY$ Cr to $ENTITY$ to buy $AMOUNT$ Fuel Cells.\nLocation: $SHIP$ in sector $SECTOR$">
            <replace string="'$MONEY$'" with="$moneytext" />
            <replace string="'$ENTITY$'" with="this.name" />
            <replace string="'$AMOUNT$'" with="$amount" />
            <replace string="'$SHIP$'" with="this.ship.name" />
            <replace string="'$SECTOR$'" with="this.sector.name" />
          </substitute_text>
          <write_to_logbook category="upkeep" text="$logtext" />


A fairly simple bug which I patch in FormatThousands and which should really be eliminated at source

$moneytext is set up to be used in show_notification and includes a {1001,101} Cr and then its substituted into $logtext which also has a {1001,101} Cr inside {1016,15} so you get the double Cr when its written to the logbook

Low priority

jth

Back to top
View user's profile Send private message
j.harshaw
EGOSOFT
EGOSOFT



Joined: 23 Nov 2015



modified
PostPosted: Wed, 25. Nov 15, 20:52    Post subject: Reply with quote Print

Thank you, everyone, for your reports so far.

...
@jth, the problem is being looked at.

And thank you for the particularly clear presentation of the problem.

...
@Clownmug, sent you a PM.

...
@Marvin, Uni, nice ideas, but we really can't entertain suggestions at the moment.

That said, I think that it is a good idea to have ideas like this which are of particular use to modders available in one place. So keep them coming, but more bug reports than suggestions, please.

...
@Uni, flagged your report about trade orders for further attention.

=== NOTED UP TO THIS POINT ===

edit: Grammar is hard.



Last edited by j.harshaw on Wed, 25. Nov 15, 23:44; edited 2 times in total
Back to top
View user's profile Send private message
Marvin Martian





Joined: 08 Apr 2012
Posts: 2339 on topic

Thank you for registering your game
PostPosted: Wed, 25. Nov 15, 21:05    Post subject: Reply with quote Print

my suggestion doesn't work yet, so in case it is a bug Very Happy

ok you want a bug:
reservation handling like get_ware_reservation do not distinct if the reservation is a in-comming amount, or a open sell trade

so in case you have a Station that trades for example ore by tradewares, you have nothing to sell in case your cargo-amount is less then incomming miningship deliver-reservations

thats also effects the Manager, not only the funtion above

up to 400 this was only a modding related problem because we had no tradestation, but as far i know, we now will get a station for trade, then on ware with high flow this will be a upcomming problem

Back to top
View user's profile Send private message
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)

MEDAL

Joined: 20 Nov 2005
Posts: 13529 on topic

Thank you for registering your game
PostPosted: Wed, 25. Nov 15, 21:09    Post subject: Reply with quote Print

@Marnin

seconded, doesnt affect me yet but yes Buy and Sell Reservations are the same.. not affecting anything if a Ware is only bought or Sold, but in case its traded in both directions things get weird.. so the possibility to differ between incoming and outgoing reservations would be really helpful...


_________________
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: 6702 on topic
Location: UK
Thank you for registering your game
PostPosted: Wed, 25. Nov 15, 21:18    Post subject: Reply with quote Print

Not sure if related but we have a few NPC stations that try to buy and sell the same items already.


_________________
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
Marvin Martian





Joined: 08 Apr 2012
Posts: 2339 on topic

Thank you for registering your game
PostPosted: Wed, 25. Nov 15, 21:43    Post subject: Reply with quote Print

yes the Plutarch Exchange
in case you have a similar "trading" and enough material for a full trade it buys minerals to max prices and sell to min at the next moment - your ship don't need to undock Razz
it's like printing credits, as long as you not the owner of this station Rolling Eyes

it might be better to buy max at average and sell not lower then the average ware price instead of the full price range

Back to top
View user's profile Send private message
Sparky Sparkycorp
Moderator (English)
Moderator (English)



Joined: 30 Mar 2004
Posts: 6702 on topic
Location: UK
Thank you for registering your game
PostPosted: Wed, 25. Nov 15, 23:35    Post subject: Reply with quote Print

Haha. There's also the missile re-seller station in OL and Food Rations traded in the DV Habitations.


_________________
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
Marvin Martian





Joined: 08 Apr 2012
Posts: 2339 on topic

Thank you for registering your game
PostPosted: Thu, 26. Nov 15, 08:57    Post subject: Reply with quote Print

i think the FoodRations Trade is not tradeware based, they produce an amount, maybe a bit less they consume
here the manager reserve an amount of cargo stored ware already for the production

Back to top
View user's profile Send private message
j.harshaw
EGOSOFT
EGOSOFT



Joined: 23 Nov 2015



PostPosted: Thu, 26. Nov 15, 12:22    Post subject: Reply with quote Print

Oliver's old bugrep about crafting:

http://forum.egosoft.com/viewtopic.php?t=384206

Problem:

oliverjanda wrote:
Hi,
I'm not sure if I'm in the right forum. Please move it to where it belongs...

I added some crafting recipes to the game and encountered an issue there:
It seems that it is only possible to set an amount of an inventory item once.
All other attempts to set a different amount in another recipe fail. :/

I.e. you can not make a recipe that requieres 100 Xenon components as there is already one that uses 1 component. Consequently, the new recipe will only require 1 xenon component for crafting regardless of the amount you specified.


Further discussed here:

http://forum.egosoft.com/viewtopic.php?t=378198

and here

http://forum.egosoft.com/viewtopic.php?t=378936

Back to top
View user's profile Send private message
j.harshaw
EGOSOFT
EGOSOFT



Joined: 23 Nov 2015



PostPosted: Thu, 26. Nov 15, 12:46    Post subject: Reply with quote Print

Another old report by OliverJanda:

http://forum.egosoft.com/viewtopic.php?t=379227

Problem:

Loading game via "Continue" does not appear to trigger <event_game_loaded/>

Last tested in X:R 3.53, so might have been fixed since then.

oliverjanda wrote:
I'm not sure if this of interest here. Just ignore it if not...

I made a perfectly working MD script (see below) which is called on game load.
It was called on pressing f9 or loading via the load menu.
But it was NOT called when starting the game with the continue button.


Code:
      <cue name="CraftDronesMKxPatch" instantiate="false">
         <conditions>
            <check_any> 
               <event_cue_signalled cue="md.Setup.GameStart" />
               <event_game_loaded/> 
            </check_any>     
         </conditions>
         <actions> 
            <include_actions ref="PatchTraderWares" />   
            <reset_cue cue="this"/>
         </actions> 
      </cue>


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3 ... 14, 15, 16  Next
 
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 Sat, 20. Jan 18, 11:22

All times are GMT + 2 Hours


Board Security

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