[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

User avatar
Marvin Martian
Posts: 3548
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Sat, 16. Jan 16, 17:41

"on a per funtion basis" :roll:
but THAT is exactly what i try to say! this not a practical way to add a single link, it will be already a problem if two mods try to add a link, thats designed to fail!

instead of "patch" the XML you could add a link by some conditons in your own CUE, so why is there not a simple "extends function" possible in this special case?

come on, that can't be serious!

why not a "hook" function on some good positions to grab requests in case no vanilla conditions had catched up that point and ... don't know any callback-magic-stuff

OR like i suggested the post before, use an array to build the menu

really, i like to see a try to go far away from that 6(5)-PointPainMenu, but this thing will be much more worse

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

Post by Phipsz » Sat, 16. Jan 16, 18:08

I didn't look at the new menu_neworder, but what I think you want to do is possible. if there is a list you and other modders
want to add an entry to, then that is possble, look at the sidebar. we have multiple mods that are adding entries to the sidebar
menu and everyones shows up, not only the last one. the replacement on a per function basis that Yorrick mentioned is not
really a replacement but, if done correctly, an extension on a per function basis. if it were a replacement, everyone adding
menu entries would have to use my sidebar extender, but, seeing that is not the case, the extension obviously works for adding
entries. if you would want to completely rework the menu, well, that would be something else :)

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

Post by Sparky Sparkycorp » Sat, 16. Jan 16, 18:19

Marvin Martian wrote: really, i like to see a try to go far away from that 6(5)-PointPainMenu, but this thing will be much more worse
Just an aside in case any use outside this discusson: The Drone Ability Menu has 10 buttons and if any object is selected, the name of the object (or a similar shortened version) is written in the centre of the menu. So I guess in some way, commands could be transmitted out to objects via mods.

Since the vanilla options are not context-depend, I'd personally be happy if the menu was hijacked by mods if something is selected. Well, perhaps Smart Defense could be considered context dependent since we my have less time and interest in deselecting targets, but that still leaves 9.

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

Re: menu-production.lua doesn't update stock/limit fields properly

Post by jth » Sat, 16. Jan 16, 18:42

jth wrote:When menu-production.lua initially displays there are a number of Stock/limits fields that show up as xxx / yyyy

When the values are updated they only shows Stock xxxx

The gMain_object_closeup is getting it right but the gMain_objectProduction is not on update. I think that the Stock/Limit thing has only just been added to the gui

Also it would be nice if the production\hour field in menu-production.lua could be updated regularly as this can change due to hull damage etc etc
If you change menu_production.lua, function menu.updateWares, the Helper.updateCellText line

from

Code: Select all

Helper.updateCellText(menu.selecttable, headerrow + i, 3, ConvertIntegerString(ware.amount, true, 4, false))
to

Code: Select all

Helper.updateCellText(menu.selecttable, headerrow + i, 3, ConvertIntegerString(ware.amount, true, 4, true) .. " / " .. ConvertIntegerString(GetWareProductionLimit(menu.container or menu.object, ware.ware), true, 4, true))
that borrows the line from menu.addWares and should fix the stock/limit issue

Thats the easy bit :)

EDIT 17/01/2016
To update the production\hour the fourth field needs updating too

Code: Select all

function menu.updateWares(waretable, oldwaretable, headerrow)
	local usage = -1
	if headerrow == 4 then 
		usage = 1
	end
	if #waretable ~= 0 then
		for i, ware in ipairs(waretable) do
			if oldwaretable[i].amount ~= ware.amount then
				oldwaretable[i].amount = ware.amount
				Helper.updateCellText(menu.selecttable, headerrow + i, 3, ConvertIntegerString(ware.amount, true, 4, true) .. " / " .. ConvertIntegerString(GetWareProductionLimit(menu.container or menu.object, ware.ware), true, 4, true))
				Helper.updateCellText(menu.selecttable, headerrow + i, 4, ConvertIntegerString(usage * ware.cycle * 3600 / menu.proddata.cycletime, true, 4, true))
			end
		end
	end
end
Regards

jth

florianlt
EGOSOFT
EGOSOFT
Posts: 1304
Joined: Mon, 22. Aug 11, 14:05
x4

Re: menu-production.lua doesn't update stock/limit fields properly

Post by florianlt » Thu, 21. Jan 16, 16:34

thanks for catching that. Fixed in an upcoming build.
jth wrote:

Code: Select all

	local usage = -1
	if headerrow == 4 then 
		usage = 1
	end
That is an evil hack.

j.harshaw
EGOSOFT
EGOSOFT
Posts: 1889
Joined: Mon, 23. Nov 15, 18:02

Post by j.harshaw » Thu, 21. Jan 16, 22:12

And OP updated.
modders' bugrep thread wrote:13) Vile lua stuff :P - jth

- FIXED
I think that covers everything up to this point. If we missed something, please poke me with a PM.

=== NOTED UP TO THIS POINT ===

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

menu-production.lua doesn't update when primary ware changes

Post by jth » Wed, 27. Jan 16, 12:19

more lua stuff :)

version 3.61. I expect 4.00 to do this too

Found this one yesterday while looking at a Missile Forge as it flipped to the next type of missile and continued to show the missile type that was building when I opened menu-production.lua a few minutes before

At that point all the primary ware fields need updating plus all the Consumption fields (did update but got the answer wrong may be pointing to the wrong missile type).

Not sure if it would be easier\safer to just reload the whole page.

I expect the Turret Forge to have the same problems

jth

User avatar
Marvin Martian
Posts: 3548
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Sat, 30. Jan 16, 10:43

i'm working on a replacer mod for the pirate outposts from good for nothing into tradestations and pirate-smallship-shipyards
but i need to patch the production what is not possible as far i know, so i decided to destroy the station, because of they will spawn again anyway - but that doesnt' work well, for the reason of missing Managers and other control entities :(

so i need to patch the new stations with clean up all and do a 'init station' for myself again :|

so my bugreport:
in case you destroy a station by scripting, next game loaded the station get created again, but the manager, defence, engineer are missing!
i read something similar about the 4.0.0 new tradestations, and this should been fixed, but it seems at 400b6hf1 to me not!

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

Post by UniTrader » Sat, 30. Jan 16, 11:18

@Marvin

what about removing the Production Modules and then patching the Station to re-add them? this should only remove non-essential actors, if at all
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 ;)

User avatar
Marvin Martian
Posts: 3548
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Sat, 30. Jan 16, 11:58

could be a solution, but because of the player should not have "friends" at pirate Outposts this shouldn't be a problem

if the station get new and nicely build this should be working better in that case

sideeffect is here that reivers start there daily work now at the new shipyard and the first habitat on there way is like a honypot :S

User avatar
Marvin Martian
Posts: 3548
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Tue, 9. Feb 16, 09:23

I have this at my debuglog multiple times

Code: Select all

[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: lib.ammo.drones on entity 0x3002, wake reason mask=0001
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: trade.station on entity 0x3002, wake reason mask=0040
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: move.park on entity 0x193e6, wake reason mask=0001
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: lib.ammo.drones on entity 0x3002, wake reason mask=0001
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: trade.station on entity 0x3002, wake reason mask=0040
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: move.park on entity 0x193e6, wake reason mask=0001
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: lib.ammo.drones on entity 0x3002, wake reason mask=0001
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: trade.station on entity 0x3002, wake reason mask=0040
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::Move(): Possibly infinite wake request loop: move.park on entity 0x193e6, wake reason mask=0001
[General] ======================================
normaly i would post it at the beta-bug forum but in case i will only hear that this is the bugthread for modified so i post it here

the point is, i have not modified any of these files as far i know, so in my opinion, it seems to be a vanilla bug

maybe someone will take a look into, or not

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

Post by Sparky Sparkycorp » Tue, 9. Feb 16, 10:03

In case it helps, that error was also reported in the following old mod threads:

23.11.2013: Functional Trader + stable supply/demand (0.22 final WIP)

14.07.2014: Manual Command Extension v0.20

I doubt you're using those mods but perhaps listing yours could help Devs gain a clue about where any interactions are occurring. Would you be able to narrow it down to a particular mod(s) that causes it?

j.harshaw
EGOSOFT
EGOSOFT
Posts: 1889
Joined: Mon, 23. Nov 15, 18:02

Post by j.harshaw » Tue, 9. Feb 16, 10:20

Hey Marvin, thanks for the report. Would you happen to have a save where the debuglog spam spews reliably?

User avatar
Marvin Martian
Posts: 3548
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Wed, 10. Feb 16, 13:31

Code: Select all

[=ERROR=] Widget system error. Vertical space left (790) doesn't suffice to display the requested table (calculated required min height: 928). Table will not be displayed.
my it not possible to make a scrollbox inside the avalible space?
with longer Lists at show_help will not displayed, but in case you write it in the log, you screw it up too

to reproduce:
create a long logentry with a lot of new lines

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

[4.00 RC2] Game crashes from destroying region objects - Modded game

Post by Clownmug » Fri, 19. Feb 16, 00:05

I'm having an odd problem with one of my mods at the moment. It seems that if I use <destroy_object/> or <destroy_group/> to destroy region objects, then the game will crash if the player is within the same cluster. If I try destroying regions immediately after <event_game_loaded/>, then the game freezes indefinitely.

DocAce
EGOSOFT
EGOSOFT
Posts: 640
Joined: Sun, 22. Feb 04, 16:26
x4

Post by DocAce » Fri, 19. Feb 16, 11:14

What is the object you're destroying? An asteroid (or something similar) from a region, or the region itself? The latter isn't really supported, and I would not be surprised if it crashed.

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

Post by Clownmug » Fri, 19. Feb 16, 18:20

The object is the whole region. I had never had problems with destroying regions until around Beta 6 or 7, then it would start freezing the game if I didn't add delays to the code. After RC2 the only way I can do it now without crashing or freezing is by warping the player to another system, destroying the region(s), then warp the player back after waiting 1-2 seconds.

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

Post by CBJ » Fri, 19. Feb 16, 18:57

As DocAce said, removing regions is not supported, and crashes are not at all unexpected. Indeed I wouldn't be surprised if it crashed occasionally even when you move the player out of the system.

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

Post by Clownmug » Fri, 19. Feb 16, 19:56

Ok, I understand why it wouldn't need to be supported officially, but it did work flawlessly before 4.0, even if it wasn't by design.

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

Post by Sparky Sparkycorp » Fri, 19. Feb 16, 20:48

Hi Clownmug,

It doesn't sound like you've unearthed a bug at the moment so you're thread's now in this one in case support is possible later on. Please see the OP in case there's any info requests that could be useful.

Return to “X Rebirth - Scripts and Modding”