[Official Mod Development Bug Reports] A Thread for Mod Creators
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
- YorrickVander
- Posts: 2689
- Joined: Tue, 29. Oct 13, 21:59
Code: Select all
<do_while value="$target.isnaughty">
<set_value name="$target.attention" exact="extremelyhigh"/>
<run_script name="maketarget.move.standinthe">
<param name="destination" value="corner"/>
<param name="endintargetzone" value="true"/>
</run_script>
<set_value name="$target.attention" exact="overtheresomewhere"/>
<wait min="120min" max="180min"/>
<do_if value="$target.isnice">
<break/>
</do_if>
</do_while>
<do_if value="not $target.incorner?">
<set_value name="$target.isnaughty" exact="true"/>
</do_if>
<do_if value="$target.isnaughty and $target.isnice">
<run_script name="scratch.head"/>
</do_if>
first let me thank you all @egosoft for now so actively reacting to community stuff instead of only
listening and not giving feedback, you guys are great!
@topic: I have found what I consider a bug, although it may be a design decision: while fixing the
MultiAssignment mod I've been fiddling with the new ui a bit (which looks really neat btw!). as I'm
using quite a bit of buttons at the button table I thought it would be nice to use the newly won space
and tried to add all buttons in one row (are only 5 atm) and I got the following error in the log:
while I think that was a quite valid design before I think it could be made a higher limit. instead of
using the new space to make all buttons wider, why not be able to add more instead?
listening and not giving feedback, you guys are great!
@topic: I have found what I consider a bug, although it may be a design decision: while fixing the
MultiAssignment mod I've been fiddling with the new ui a bit (which looks really neat btw!). as I'm
using quite a bit of buttons at the button table I thought it would be nice to use the newly won space
and tried to add all buttons in one row (are only 5 atm) and I got the following error in the log:
Code: Select all
CWidgetController::SetUpView() - Validation error: 'Script error: 'Too many columns. Table contains 11 columns while the max number of columns allowed is 10'
using the new space to make all buttons wider, why not be able to add more instead?
Quick question, is it intended that the attack command ("command.fight.attack") makes the ship (a capital ship in that case) pursue its target even if it (the target) jumps to another sector (after the fight has been engaged)?
It seems that at some point, the "pursuetargets" param in "move.attack.object.capital" (which defaults to false) is set to true. So I had a look at the script hierarchy ("player.default" -> "command.fight.attack" -> "fight.attack.object" -> "move.attack.object.capital"). The only thing I found is "not @$escort" being passed as a param in "command.fight.attack", and since "$escort" is defaulted to null here it's like writing "not null". What is that supposed to evaluate to? Same behavior as in LUA?
I just don't think it makes sense that a ship is allowed to pursue another one everywhere, not only it can be dangerous, but we're not really supposed to know where another ship jumps to I think. Or maybe it should only be able to pursue in the sector (from one zone to another), not in the whole galaxy.
So yeah, I thought it might be a bug.
3.61 and 4.00 beta 4.
It seems that at some point, the "pursuetargets" param in "move.attack.object.capital" (which defaults to false) is set to true. So I had a look at the script hierarchy ("player.default" -> "command.fight.attack" -> "fight.attack.object" -> "move.attack.object.capital"). The only thing I found is "not @$escort" being passed as a param in "command.fight.attack", and since "$escort" is defaulted to null here it's like writing "not null". What is that supposed to evaluate to? Same behavior as in LUA?
I just don't think it makes sense that a ship is allowed to pursue another one everywhere, not only it can be dangerous, but we're not really supposed to know where another ship jumps to I think. Or maybe it should only be able to pursue in the sector (from one zone to another), not in the whole galaxy.
So yeah, I thought it might be a bug.
3.61 and 4.00 beta 4.
I'm not the house ai expert but, if I remember correctly, pursuedistance and pursuetargets only become relevant if fight.attack.object is called from move.escort or move.escort.capital, in which case $escort is defined. "not @$escort", in this case, would resolve to 0 because $escort would neither be null nor 0. In any other case "not @$escort" would resolve to 1 because the variable wouldn't even be defined. (This is if nothing has changed the behavior of "not" in a way that affects this particular case. Ran into some unexpected behavior with "not $var?" while working with md recently.)
In both cases, however, escort and pursuedistance are defined, but pursuetargets is not, so should still revert to default.
I think command.fight.attack is only called when the player commands a ship to attack?
As to your question, will have to ask the house ai expert if it's intended. Give us about a week.
In both cases, however, escort and pursuedistance are defined, but pursuetargets is not, so should still revert to default.
I think command.fight.attack is only called when the player commands a ship to attack?
As to your question, will have to ask the house ai expert if it's intended. Give us about a week.
I did a runtime check with a "command.fight.attack" patch just to be sure, hoping it can save you some time:
Here's the result:
[ external image ]
So null is indeed coerced into an boolean / integer value. It is then passed on to the next script as $pursuetargets.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<add sel="/aiscript[@name='command.fight.attack']/attention[@min='unknown']/actions">
<show_help custom="'$escort is %1\nnot @$escort resolves to %2'.[@$escort, not @$escort]"/>
</add>
</diff>
[ external image ]
So null is indeed coerced into an boolean / integer value. It is then passed on to the next script as $pursuetargets.
As far as I know yes.j.harshaw wrote:I think command.fight.attack is only called when the player commands a ship to attack?
No problem!As to your question, will have to ask the house ai expert if it's intended. Give us about a week.
- YorrickVander
- Posts: 2689
- Joined: Tue, 29. Oct 13, 21:59
Another of my issues that may just be an artifact of my mod I'm redoing Galaxy Station Range for 4.0 and adding subordinate range setting to Architects (shout to Sparky for bugging me to try this) as they only look in sector by default for deals for their assigned traders. What I see in testing is that a ship with 0 fuel does not appear to try and refuel itself before jumping. This takes ~10 mins as usual for first jump then jumps normally after. Manually setting auto refuel then allows it to fill up after the initial trade is complete. Is this deliberate to save budget issues? A bug in my addon behaviour? Or just a bug? Further testing of vanilla manager assigned ships to stations can be done but I thought I'd ask to save a few hours
X Rebirth - A Sirius Cybernetics Corporation Product
Split irritate visiting pilot with strange vocal patterns.
Split irritate visiting pilot with strange vocal patterns.
- YorrickVander
- Posts: 2689
- Joined: Tue, 29. Oct 13, 21:59
Not a bug but I'd like an official confirmation please : Are we allowed to use warehouses in mods for 4.0+ game? I know they are available for npc use but as they are also a selling point for the expansion and not included for player use without purchase I don't want to use them unless ES say it's ok to do so.
X Rebirth - A Sirius Cybernetics Corporation Product
Split irritate visiting pilot with strange vocal patterns.
Split irritate visiting pilot with strange vocal patterns.
- YorrickVander
- Posts: 2689
- Joined: Tue, 29. Oct 13, 21:59
well, the Station itself is part of the Core Game:
=> Macro File is part of the Core Game ( struct_bt_alb_warehouse_macro )
=> it seems it will be used in the Core Game by Non-Player Factions (Sorveign Sydicate has/will have one)
=> the UI/Script Mechanics for Player Warehouses are part of the Core Game too
=> and the Script Functionality also recognizes this Warehouse properly
the only missing Link i see is the Entry in the Core Game Construction Vessels so the Player can build it (which is trivial to do without including any Assets), and by your definition above this is fine to do.
(i dont want to stretch this, just want a clear answer taking the circumstates I explained here into account which make the clarification necesary, which Yorricks Post above didnt mentoin but this caused the question to arise)
=> Macro File is part of the Core Game ( struct_bt_alb_warehouse_macro )
=> it seems it will be used in the Core Game by Non-Player Factions (Sorveign Sydicate has/will have one)
=> the UI/Script Mechanics for Player Warehouses are part of the Core Game too
=> and the Script Functionality also recognizes this Warehouse properly
the only missing Link i see is the Entry in the Core Game Construction Vessels so the Player can build it (which is trivial to do without including any Assets), and by your definition above this is fine to do.
(i dont want to stretch this, just want a clear answer taking the circumstates I explained here into account which make the clarification necesary, which Yorricks Post above didnt mentoin but this caused the question to arise)
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
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
- YorrickVander
- Posts: 2689
- Joined: Tue, 29. Oct 13, 21:59
The way I read CJB's response is this : we can use the warehouse for example in the same way as it is used for vanilla. That is to say npc owned. Making it in some way player owned would infringe on the 'borrowing assets' clause.
X Rebirth - A Sirius Cybernetics Corporation Product
Split irritate visiting pilot with strange vocal patterns.
Split irritate visiting pilot with strange vocal patterns.
The ownership of an asset is not part of the asset in this sense. Plus ES always stated that any functionality will be available via patches (and WH has an eco feature missing and requested since day1), and only content will be released via DLCs.
Or CBJ means the AI dealing with the warehouse offers as DLC only asset?
Let's say someone modded those scripts to be available for a normal station's manager would that be illegal?
Or CBJ means the AI dealing with the warehouse offers as DLC only asset?
Let's say someone modded those scripts to be available for a normal station's manager would that be illegal?
Just had a talk with Adrian. If the attack order was triggered via command.fight.attack, that is, the ship was following the Skunk and was explicitly told to attack something, then the ship should indeed pursue a target ship even if it jumps.bm01 wrote:Quick question, is it intended that the attack command ("command.fight.attack") makes the ship (a capital ship in that case) pursue its target even if it (the target) jumps to another sector (after the fight has been engaged)?
menu-production.lua doesn't update stock/limit fields properly
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
Regards
jth
EDIT
Should have said what version it was which was 3.61, had a quick look at the 4.00 beta version code and I think that the issue is still there but haven't powered up 4.00 to 100% verify
EDIT 16/1/2016 4.00 beta 5 won't give me the menu-production.lua at all I just get kicked out of all menus when I select one of the production lines and click on Details and no error messages in debug.log. The last thing in there is
[Scripts] *** Context:md.MainMenu.SectionHandler<inst:4b039>: Next section: gMain_objectProduction
the previous menu closes and nothing opens
At that point if I hit Enter or . then nothing happens until I reload the game
Is this the menu options issue being reported on the beta forum ?
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
Regards
jth
EDIT
Should have said what version it was which was 3.61, had a quick look at the 4.00 beta version code and I think that the issue is still there but haven't powered up 4.00 to 100% verify
EDIT 16/1/2016 4.00 beta 5 won't give me the menu-production.lua at all I just get kicked out of all menus when I select one of the production lines and click on Details and no error messages in debug.log. The last thing in there is
[Scripts] *** Context:md.MainMenu.SectionHandler<inst:4b039>: Next section: gMain_objectProduction
the previous menu closes and nothing opens
At that point if I hit Enter or . then nothing happens until I reload the game
Is this the menu options issue being reported on the beta forum ?
Last edited by jth on Sat, 16. Jan 16, 15:37, edited 1 time in total.
- Marvin Martian
- Posts: 3546
- Joined: Sun, 8. Apr 12, 09:40
first of all, i have no idea how to work with the UI and lua, but since Beta5 i see the new conversation Menu in case i call a ship by using the map
as far i know, if i would modify something, i need to create a new file and replace the original - ok but how should this work with more then one change?
i doesn't make much sense to me to handle this for the menu_neworder
so it would be nice to get a simple way for this to add single entries!
like a based XML with an array of links that can be patched and the menu will be created based on that array
as far i know, if i would modify something, i need to create a new file and replace the original - ok but how should this work with more then one change?
i doesn't make much sense to me to handle this for the menu_neworder
so it would be nice to get a simple way for this to add single entries!
like a based XML with an array of links that can be patched and the menu will be created based on that array
- YorrickVander
- Posts: 2689
- Joined: Tue, 29. Oct 13, 21:59
With the current system we can replace things on a per funtion basis rather than the old whole file method. To my understanding, like the xml the init is run at game startup and if debug command 'RELOADUI' is triggered. The current modding method then hijack's the functions we want to redefine at init time much the same as xml patching. It's clearly not as flexible as an xml diff but it's not that bad. My galaxy station range mod makes use of that for a working example.
X Rebirth - A Sirius Cybernetics Corporation Product
Split irritate visiting pilot with strange vocal patterns.
Split irritate visiting pilot with strange vocal patterns.