[Official Mod Development Bug Reports] A Thread for Mod Creators

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

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

Clownmug
Posts: 418
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug » Fri, 19. Feb 16, 21:33

Oh, I forgot about this thread. Well I guess you guys consider it within acceptable parameters then. I just hope it won't lead to a resonance cascade or anything later on.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Fri, 19. Feb 16, 21:47

j.harshaw assures me that his Anti-Mass Spectrometer is in good nick. What could possibly go wrong?

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

lua error reporting chops off most of filename

Post by jth » Sat, 20. Feb 16, 15:45

Hi

when my code generates an error in a lua script it reports something like

[=ERROR=] C:/Program Files (x86)/Steam/steamapps/common/X Rebirth/extensions/station_prod/ui/stationprod/menu_p...(478):

which is not terribly helpful if all my lua scripts start menu_p... :(

it doesn't seem to shorten the directory path at all just the filename

any chance of having the complete filename please

jth
Last edited by jth on Sat, 20. Feb 16, 16:32, edited 2 times in total.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Sat, 20. Feb 16, 16:04

I'm not exactly a mod creator (!) but something I noticed recently was that the Xenon I has no base price within their encyclopaedia entry. This contrasts with all other Xenon ships, such as the K valued at 25.5 million before surface elements. This could matter for any mod wanting to allow sale or purchase of the Xenon I.

So again, not exactly for mod creation but I use the base price below as part of an overall cost estimate for the Xenon I so that like others, it can described by stats like DPS/credit and hitpoints/credit. Both for vanilla ships and ships from mods (e.g. CWIR).

Proposed base price for Xenon I
162,231,060 credits (for encyclopaedia; excludes surface elements etc).

Basis of proposal
The total hitpoints (hull + hull shield) of the Xenon I is equal to 27.3 million. Base prices for large and extra large, non-Teladi Fight ships in the encyclopaedia increase linearly with total hitpoints. The r2 is 0.969, the gradient (m) is 0.1688 and the intercept (c) is -84,603. The proposed price is derived from the Xenon I's total hitpoints.

CBJ
EGOSOFT
EGOSOFT
Posts: 52241
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ » Mon, 22. Feb 16, 13:21

Clownmug wrote:Oh, I forgot about this thread. Well I guess you guys consider it within acceptable parameters then. I just hope it won't lead to a resonance cascade or anything later on.
Could we have one of the crashdumps corresponding to this crash, please? We won't necessarily be fixing it, but we would like to see whether it corresponds to a particular case we are investigating.

User avatar
ubuntufreakdragon
Posts: 5203
Joined: Thu, 23. Jun 11, 14:57
x4

Post by ubuntufreakdragon » Mon, 22. Feb 16, 18:29

Sometimes ago I came across some unexpected behaviour of storage module, when allowing energy freighters transporting fuelcells in their energy storage module for refuelling purposes:
They always used the energy storage first, which is quite stupid as the fuel storage can't hold anything else so it should be prioritized.

The current politics seams to be evading such situations.
However I see an opportunity to make the code more robust against such and similar situations, all we need is a derived unsigned bigendian 6bit int that represents the "value" of the storage module.
the first 2 bits show how many types of cargo the module can hold (we only count types that are used by more than one ware (container+bulk+energy+liquid).(we only save values beween 1-4 here, a value of 0 will be treated as 1, (the remaining 4 bits will tell us the difference), so 2bits are enough)
the last 4 bits show the allowed types ordered by their commonness so they would be: container,bulk,energy,liquid.
If we now always fill the lowest priority first, most of this stupid situation would be solved, and by presorting the storage modules on game start we can decrease the cpu complexity of this to:
O(m*n*log(n)) on gamestart
and
O(0) while running the game
m:= number of ships&stations
n:= maximum amount of storage modules of these objects
Last edited by ubuntufreakdragon on Mon, 22. Feb 16, 20:27, edited 1 time in total.
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

Clownmug
Posts: 418
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug » Mon, 22. Feb 16, 20:21

CBJ wrote:
Clownmug wrote:Oh, I forgot about this thread. Well I guess you guys consider it within acceptable parameters then. I just hope it won't lead to a resonance cascade or anything later on.
Could we have one of the crashdumps corresponding to this crash, please? We won't necessarily be fixing it, but we would like to see whether it corresponds to a particular case we are investigating.
Sure, here's a link to the dumps from the day I was trying to fix my mod: Crash Dump Files

CBJ
EGOSOFT
EGOSOFT
Posts: 52241
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ » Tue, 23. Feb 16, 15:18

Thanks. We have a fix coming up for the specific crash you encountered, but there's no guarantee there won't be more further down the line as it remains an unsupported action.

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

Post by UniTrader » Tue, 23. Feb 16, 15:30

Also why do you want to destroy a region? Wouldn't completely depleting its Yield be better? (can be done by omitting the object in deplete_yield)
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 ;)

Clownmug
Posts: 418
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug » Tue, 23. Feb 16, 20:13

CBJ wrote:Thanks. We have a fix coming up for the specific crash you encountered, but there's no guarantee there won't be more further down the line as it remains an unsupported action.
Thanks for looking into the issue. I'll try not to break the game too much in the future. :wink:

Edit: I just tested it after downloading the RC3 patch and I'm still having crashing. Was the fix supposed to be in RC3 or an upcoming patch?
UniTrader wrote:Also why do you want to destroy a region? Wouldn't completely depleting its Yield be better? (can be done by omitting the object in deplete_yield)
I set up my mod so that multiple regions exist on top of each other on the map. Then I destroy some of them to simulate random resources. I've never tried <deplete_yield/>, but I don't think it would remove the asteroid fields or fog volumes. Also, my hazardous region and lockbox region don't have any resources to deplete for their region definitions. Here's a link to the mod in case you want to take a look: Random Universe

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

Post by UniTrader » Tue, 23. Feb 16, 20:38

it does remove Asteroid Fields ;) (saw this myself when i experimented with Ressource Regeneration) - they will regenerate slowly though (i could see how the Field regained density over time)

not sure about nebulae/Fogs though.. not tested since the results for Asteroids were enough for me ^^

but yes, for Danger Zones its a must to destroy them ith this approach..


although i think creating the Map Files externally is a better and more dynamic approach.. not sited for releasing via Workshop though
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 ;)

Clownmug
Posts: 418
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug » Tue, 23. Feb 16, 20:57

UniTrader wrote:it does remove Asteroid Fields ;) (saw this myself when i experimented with Ressource Regeneration) - they will regenerate slowly though (i could see how the Field regained density over time)

not sure about nebulae/Fogs though.. not tested since the results for Asteroids were enough for me ^^

but yes, for Danger Zones its a must to destroy them ith this approach..
Oh, in that case I guess I'll start testing with <deplete_yield/>. If it works for what I want to do, then I could just add hydrogen or something to the hazard and lockbox regions.
UniTrader wrote:although i think creating the Map Files externally is a better and more dynamic approach.. not sited for releasing via Workshop though
I'm guessing you mean having another program outside the game generate the map files? That would be far beyond my skill level.

CBJ
EGOSOFT
EGOSOFT
Posts: 52241
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ » Wed, 24. Feb 16, 13:29

Clownmug wrote:I just tested it after downloading the RC3 patch and I'm still having crashing. Was the fix supposed to be in RC3 or an upcoming patch?
The fix was in RC3, but as I said it was just for the specific crash location in the crashdumps you provided. There may well be other places that don't cope well with the unexpected situation. It's too late now for any further fixes, but I'd still be interested in seeing a new crashdump from RC3, just to see where it's crashing now.

Clownmug
Posts: 418
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug » Wed, 24. Feb 16, 17:08

CBJ wrote:
Clownmug wrote:I just tested it after downloading the RC3 patch and I'm still having crashing. Was the fix supposed to be in RC3 or an upcoming patch?
The fix was in RC3, but as I said it was just for the specific crash location in the crashdumps you provided. There may well be other places that don't cope well with the unexpected situation. It's too late now for any further fixes, but I'd still be interested in seeing a new crashdump from RC3, just to see where it's crashing now.

Ok, I understand. Here's a link to a crash dump from yesterday: Dump File

User avatar
alexalsp
Posts: 1839
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 29. Feb 16, 04:26

Good afternoon. I noticed a strangeness.
I tried different mod, which alter the ships, adding weapons or shields, or a new ship.

After building the ship in the shipyard, for example

http://prntscr.com/a99atq

http://prntscr.com/a99uwb

http://prntscr.com/a99v4x

all in their places.

If fly to another area, after a minute from the list of lost a few items of weapons.

http://prntscr.com/a99a5l

http://prntscr.com/a99upg

http://prntscr.com/a99vmj

If return to the area with the ship, all the items and weapons back to its original condition ..

This occurs with any modified ships with different modes.

I tested with different versions of the game, in the version 3.61 and 4.00.


for information:

1) Hunter Ships - http://steamcommunity.com/sharedfiles/f ... =402498286

2) Kit Fix - http://steamcommunity.com/sharedfiles/f ... =515221245

3) Redesign Ships - http://steamcommunity.com/sharedfiles/f ... =515266755

4) Xenon Hunt 2 - http://steamcommunity.com/sharedfiles/f ... =416116358

And others.

:(

Phipsz
Posts: 335
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Thu, 3. Mar 16, 21:25

I've been trying to be able to abort a script initiated on a captain with my mod "Exploration Software". But if I
use "start_script" within the aiscript to start "player.default", I get the error "Script attempts to abort itself via
<start_script>". If I move the start_script into a md cue that gets called when I send a specific signal via the
aiscript, I get a similar error "Script indirectly attempts to abort itself via <start_script>". So, my qustion: how
do I correctly set the script to initiate "player.default" when the script completes/abort orders is used? am I
supposed to call my script from within player.default as an interrupt or is there another way?

Clownmug
Posts: 418
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug » Thu, 3. Mar 16, 21:54

Why not just skip to the end of the aiscript using <resume> and then use <run_script> for player.default?

Phipsz
Posts: 335
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz » Thu, 3. Mar 16, 21:57

if I use run_script, the command state will not reset, resulting in the ship keeping the command "explore" first instead of e.g. "following albion skunk".

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

Post by UniTrader » Thu, 3. Mar 16, 22:06

a bit roundabout but maybe this works without debuglog warning:
<start_actor_transport actor="this" target="this.container"/>

(this should trigger an event which restores default behavior)
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 ;)

Clownmug
Posts: 418
Joined: Wed, 11. Dec 13, 02:39
x4

Post by Clownmug » Thu, 3. Mar 16, 22:07

Phipsz wrote:if I use run_script, the command state will not reset, resulting in the ship keeping the command "explore" first instead of e.g. "following albion skunk".
You could just use <set_command> before running the script then.

Return to “X Rebirth - Scripts and Modding”