[MOD] UFO - Ultimate Fleet Overhaul (V0.6.1 Beta, 3rd February 2015)

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

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

Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

darthmoll wrote:the distance between my ships and the enemy are 3 miles.

i have set the debug to 3


debug output herehttp://pastebin.com/i02EQaUE
I just had a look at your debug output and you see something like this repeating over and over:

Code: Select all

[=ERROR=] aicontext<ufo.move.capital.follow.any,0x1BDD>: [49556.5 - Taranis - Captain Kriss Springer] One of our protection targets was attacked. Checking gravidar depending on mode: aggressive...
[=ERROR=] aicontext<ufo.move.capital.escort.any,0x1BDD>: [49556.5 - Taranis - Captain Kriss Springer] Checking for enemies to engage in 5500m...
[=ERROR=] aicontext<ufo.move.capital.escort.any,0x1BDD>: [49556.5 - Taranis - Captain Kriss Springer] No enemies in engage distance (5500m). Aborting...
[=ERROR=] aicontext<ufo.fight.capital.defend,0x1BC8>: [49556.5 - Taranis - Defence Officer Selina Williams] One of our protection targets was attacked. Checking gravidar...
[=ERROR=] aicontext<ufo.fight.capital.defend,0x1BC8>: [49556.5 - Taranis - Defence Officer Selina Williams] Checking for enemies to engage in 5500m...
[=ERROR=] aicontext<ufo.fight.capital.defend,0x1BC8>: [49556.5 - Taranis - Defence Officer Selina Williams] No enemies to engage in 5500m. Going back to sleep...
[=ERROR=] aicontext<ufo.fight.capital.defend,0x1BC8>: [49556.5 - Taranis - Defence Officer Selina Williams] Sleeping...
That is very strange indeed. You can see it reacts to being attacked (both Captain and Defence Officer) but they can't find enemies near them. Can you upload that savegame (where you are near those enemies) somewhere and send me the link in a PM? Then I'll check it and see what's wrong.

EDIT: Okay, a theory just came to mind. I think this is a game bug, where for some reason the Xenon are an enemy to you, but not considered an enemy to your ships. To test this can you please replace all occurences of

Code: Select all

<match_relation object="this.ship" relation="enemy" comparison="le"/>
in the files ufo.move.capital.escort.any.xml and ufo.fight.capital.defend.xml with

Code: Select all

<match_relation faction="faction.player" relation="enemy" comparison="le"/>
and see if that helps?
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

oke. i have edited it. going to try it and see if it is indeed a bug.

EDIT: that didnt work :(
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

I have just tested darthmoll's savegame, and indeed, his ships are not reacting to any enemies at all. My investigation showed that this is due do <find_gravidar_contacts> not returning anything for his ships.

As a test, I parked the Skunk directly on top of one of his ships. Then I once set the gravidar scan object to the ship, and once to the Skunk, without any distance limit. The ship found 0 contacts, while the Skunk found 46. So when I replaced object="this.ship" with object="player.primaryship" in the UFO scripts, the ships would engage correctly.

I have also had a script print me all components on the ship as well as the isoperational flag, which returned true for everything, including the radar. The radar distance is also shown as 36km in the ship info screen.

My conclusion at this point is that his savegame is bugged, and that there is no way to fix it except if Egosoft finds a bug in their gravidar code. But if anyone here has any other idea what could be causing this, that would be great as well.
PREDATOR490
Posts: 34
Joined: Thu, 29. May 08, 20:41
x3ap

Post by PREDATOR490 »

Tried the new version: Still not working

Again, Taranis and Balor taken to the Xenon hub.
First I tried the usual Manual Commands > Escort me = No reaction
Then I tried to bind the Balor to the Taranis = The Taranis guns went red but never fired, the Balors stuck blue even as the Taranis was getting attacked and surrounded by Xenon.


[ external image ]

Picture 1: Taranis with Balor under it's direct command, I ordered them into offensive stance and the guns turn red for the Taranis, blue for the Balor.
Since the Xenon are as red as you can get in this game, both of these ships should be swatting down the helpless Xenon traffic like flies.

However... since it could be the ships only react to getting shot at by a hard target. Lets up the ante:

[ external image ]

Picture 2 : Xenon capital joins the fight and I try repeatedly to order my ships to attack or defend. The Taranis decides to fly off to the station while the Balor boosts in circles around it.
Naturally, the Xenon capital blew the Balor to bits when it got close.
I decided to see what the Taranis was doing:

[ external image ]

[ external image ]

Picture 3 & 4: The Xenon station is blowing the Taranis to bits while the guns keep changing from Red to Blue.

For further testing, I went and made a new game, got a Balor and tried the same round of tests - Balor did not react and got destroyed by a capital trader.

If only we had the crew of the Xenon. They seem to actively hunt the player when you are in their space and their guns track multiple targets at the same time.
I cannot believe Egosoft released a game in this state with the justification their play testing never revealed these kinds of issues.


Used the debug thing:
For my fight in the Xenon system I get the same code as Darthmoll's with some additonal:

Code: Select all

[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Property lookup failed: this.ship.pilot.$oUFO_Commander
* Expression: this.ship.pilot.$oUFO_Commander.ship
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Evaluated value 'null' is not of type component
* Expression: this.ship.pilot.$oUFO_Commander.ship
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Property lookup failed: this.ship.pilot.$oUFO_Commander
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_Follow
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Evaluated value 'null' is not of type group
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_Follow
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Property lookup failed: this.ship.pilot.$oUFO_Commander
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_CapFollow
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Evaluated value 'null' is not of type group
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_CapFollow
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Property lookup failed: this.ship.pilot.$oUFO_Commander
* Expression: this.ship.pilot.$oUFO_Commander
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Evaluated value 'null' is not of type component
* Expression: this.ship.pilot.$oUFO_Commander
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Property lookup failed: this.ship.pilot.$oUFO_Commander
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_Follow
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Evaluated value 'null' is not of type group
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_Follow
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Property lookup failed: this.ship.pilot.$oUFO_Commander
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_CapFollow
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script ufo.fight.capital.defend on entity 0x110A: Evaluated value 'null' is not of type group
* Expression: this.ship.pilot.$oUFO_Commander.$gUFO_CapFollow
I loaded up the save where it was just a Balor in Shady Vault.
I get the same code as Darth Moll again without the above.
Etyneo
Posts: 253
Joined: Fri, 25. May 12, 00:21
x4

Post by Etyneo »

I'm just waiting for the X Rebirth version of the MARS script from X3 TC/AP...

Edit: Posting DERP! I forgot to read the rest of the thread before replying...this was supposed to go on page 1 or 2... Still, hopefully the OP can implement something akin to MARS with this...
Kuugen
Posts: 3
Joined: Sat, 8. Aug 09, 10:02
x4

Post by Kuugen »

Pretty offtopic but there's no need for something like MARs. This game is a new X game. You can't change weapons in turrets and missiles in this game aren't a huge threat.
Etyneo
Posts: 253
Joined: Fri, 25. May 12, 00:21
x4

Post by Etyneo »

Kuugen wrote:Pretty offtopic but there's no need for something like MARs. This game is a new X game. You can't change weapons in turrets and missiles in this game aren't a huge threat.
If we want to get into a discussion about this, we should move to another thread or PMs... However, to clarify, I was mostly wanting the target prioritization from MARS...also, stock missiles are not really a threat (damage wise) aside from the Novadrones, but modded missiles may be more dangerous.

Let's try and return to the topic now. If you want to continue discussion, then PM me or start a seperate topic, as I should have done.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

Mad_Joker wrote:I have just tested darthmoll's savegame, and indeed, his ships are not reacting to any enemies at all. My investigation showed that this is due do <find_gravidar_contacts> not returning anything for his ships.

As a test, I parked the Skunk directly on top of one of his ships. Then I once set the gravidar scan object to the ship, and once to the Skunk, without any distance limit. The ship found 0 contacts, while the Skunk found 46. So when I replaced object="this.ship" with object="player.primaryship" in the UFO scripts, the ships would engage correctly.

I have also had a script print me all components on the ship as well as the isoperational flag, which returned true for everything, including the radar. The radar distance is also shown as 36km in the ship info screen.

My conclusion at this point is that his savegame is bugged, and that there is no way to fix it except if Egosoft finds a bug in their gravidar code. But if anyone here has any other idea what could be causing this, that would be great as well.
Have you tried setting the match reltion to less than or equal to self and seeing if the ship picks up the skunk in the gravidar scan? Also for debugging purposes you can use the relationto.{$component} function for ships. This should at least let you know if its simply throwing away the ships for not meeting faction standing requirements. I seem to recall running into similar issues with some vanilla scripts using hasrelationto.
Hornet108
Posts: 347
Joined: Thu, 15. Nov 12, 13:46
x4

Post by Hornet108 »

Came to say my ships weren't engaging, but after reading this last page, I'd say you guys are pretty much all over it.


All I can offer is my moral support and good will. Go sir go!
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

Kierk wrote:
Mad_Joker wrote:I have just tested darthmoll's savegame, and indeed, his ships are not reacting to any enemies at all. My investigation showed that this is due do <find_gravidar_contacts> not returning anything for his ships.

As a test, I parked the Skunk directly on top of one of his ships. Then I once set the gravidar scan object to the ship, and once to the Skunk, without any distance limit. The ship found 0 contacts, while the Skunk found 46. So when I replaced object="this.ship" with object="player.primaryship" in the UFO scripts, the ships would engage correctly.

I have also had a script print me all components on the ship as well as the isoperational flag, which returned true for everything, including the radar. The radar distance is also shown as 36km in the ship info screen.

My conclusion at this point is that his savegame is bugged, and that there is no way to fix it except if Egosoft finds a bug in their gravidar code. But if anyone here has any other idea what could be causing this, that would be great as well.
Have you tried setting the match reltion to less than or equal to self and seeing if the ship picks up the skunk in the gravidar scan? Also for debugging purposes you can use the relationto.{$component} function for ships. This should at least let you know if its simply throwing away the ships for not meeting faction standing requirements. I seem to recall running into similar issues with some vanilla scripts using hasrelationto.
Well, I didn't even use relation for that test. What I called was

Code: Select all

<find_gravidar_contacts groupname="$gShips" object="this.ship" functional="true" multiple="true" />
As you can see, there is no restrictions at all (except the targets being functional), so it should just give me a list of all the ships in gravidar range.
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

I have uploaded a new version of the UFO test tools to the Nexus, which has the ability to reset ships (i.e. it makes a clean copy of them and replaces the existing ships). So all scripts are aborted, actors and wares are copied, and all broken state should be left behind. If you then give the ship orders via UFO, it should respond correctly.

If you have any trouble getting UFO to work (keeping in mind the current maximum engagement distance of 9km for capital ships), then please try this. And if you do, please also make sure the ship is an actual 100% copy, and if not report it here.
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

Mad_Joker wrote:I have uploaded a new version of the UFO test tools to the Nexus, which has the ability to reset ships (i.e. it makes a clean copy of them and replaces the existing ships). So all scripts are aborted, actors and wares are copied, and all broken state should be left behind. If you then give the ship orders via UFO, it should respond correctly.

If you have any trouble getting UFO to work (keeping in mind the current maximum engagement distance of 9km for capital ships), then please try this. And if you do, please also make sure the ship is an actual 100% copy, and if not report it here.


i tried what you did and its not working for me. if i reset the ships. do i see it when they reset? cuase when i am looking at them and reset them i dont see anything happening.
the ships are 100% copy if the reset did work. and if not then they are the same..lol

here is what i did.

1. i got the ships in my squad. send a command trough MCE to hold position.
then i removed them from my squad. hoping the UFO was disabled.

2. i used your tool to reset my 2 ships.

3.added taranis as subfleet for my arawn.
4. arawn as sub to my albion skunk.
5. set the stance for offence.

spawned 10 enemy ships. nothing happend
spawned 2 enemy capitals. nohing happend. not even did the lights go from blue to red.
i looked over in my error log. and it shows this.

[timestamp: 1385798369]: Error: aicontext<ufo.fight.capital.defend,0x1B5E>: [82356.8 - Arawn - Defence Officer Ashunty Cruise] Checking for enemies to engage in 5500m...
[timestamp: 1385798369]: Error: aicontext<ufo.fight.capital.defend,0x1B5E>: [82356.8 - Arawn - Defence Officer Ashunty Cruise] No enemies to engage in 5500m. Going back to sleep...
PREDATOR490
Posts: 34
Joined: Thu, 29. May 08, 20:41
x3ap

Post by PREDATOR490 »

Mods Active:
Complete emptied the extension folder and only used UFO + Debug mods.
Went from a new game, save edited some cash and went straight to shady vault.

Ships:

1x Arawn - Captain, Defense Officer
1x Taranis - Captain, Defense Officer
3x Balor - Captain, Defense Officer

Crew were picked straight off the shady vault stations. No changes at all.


Testing Ground:
A Xenon Branch 9 showed up all by itself in zone

Tests:

1: Assigned the Balors and Taranis to the Arawn gave Offensive stance order to the Arawn
No Reaction

2: Assigned the Arawn to the Albion Skunk gave offensive stance to Albion Skunk
No Reaction

3: Assigned all the ships to the Albion Skunk gave offensive stance to Albion Skunk
No Reaction

4: Used the test tools to reset all ships, Assigned all ships to the Albion Skunk, gave the offensive stance to Albion Skunk
Arawn went active and started shooting at the Xenon Branch 9 but then it stopped
The other ships flew straight at the Xenon ship and were crashing into it without firing

5: I tried spawning enemies - Same result, only the Arawn would engage while the others flew straight at the targets

6: I tried assigning the other ships to the Arawn and giving the offensive command
Only the Arawn would react.

Finally, got annoyed and decided to go nuts with a capital spawn fight - added the core-shields mod because I knew exactly what was going to happen.


7: Used test tools to spawn friendly capitals assigned them to the non-spawn arawn
Only the spawned + Arawn were active
Interesting note: I spawned enemy capitals and they started launching drones / fighters, none of the friendly ships did

Thanks to this spawn tool I manage to witness how completely stupid this game's AI is and how horrible combat is going to be when ships have short weapon ranges. A ship that is 1km long and the weapons barely hit targets at less than 1km... = Results in this joke
This is why I added the core shields mod - not that it helped much at all when the friendly fire is this bad.

[ external image ]


So it seems as long as you use cheats to spawn ships - they work
Or some random factor allowed my Arawn to act while the others did nothing.

Question: Do the ships have to be set a commander using the ingame system ?
If so: who are you meant to set as the commander - The Captain or the Defense Officer ?
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

i am having the same outcome as you. using cheats does make UFO work.

about the commanders. i think all commanders should be set to eachother. cuase the defense manager cant fly the ship. he is not in the position as commander who can only take the position as capital pilot.
Zakuak
Posts: 85
Joined: Mon, 4. Nov 13, 22:29

Post by Zakuak »

Nice work Mad, I really appreciate you modders digging so far down into this messy rabbit hole.

I'd be content with a lot of the bugs if I could just get my ships to blow up other ships....hell I could get over the dead economy and all that ...I just wanna blow ships up....

I'll continue keeping my eye on this one and await further developments.

Cheers
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

Zakuak wrote:Nice work Mad, I really appreciate you modders digging so far down into this messy rabbit hole.

I'd be content with a lot of the bugs if I could just get my ships to blow up other ships....hell I could get over the dead economy and all that ...I just wanna blow ships up....

I'll continue keeping my eye on this one and await further developments.

Cheers
if you download the test tool and use that to spawn ships for player. then the script works perfect. at this point the ships you have build wont work with UFO script. at least not for me. use the tool and enjoy. its really impressive how this mod works. :)
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

Got this in the debug text with latest UFO test tools version:

Code: Select all


[General] ======================================
[General] ======================================
[=ERROR=] extensions\UFO_Test\md\UFO_Test.xml(92): ShipGenerator: no attribute 'list' or 'basket' for <wares> node and there is no valid default basket for cargo in definition for ship group/ref/macro '$m'

Just fyi is all. Might be bad. May be good.
PREDATOR490
Posts: 34
Joined: Thu, 29. May 08, 20:41
x3ap

Post by PREDATOR490 »

Built ships do not work with this mod.
Spawned ships do for some reason.

I tried binding a built Balor to a Spawned Taranis - The Balor would not engage while the Taranis and the other spawned Taranis went fully active, they even started launching drones which almost gave me hope.

Loading up the save with the save editor
Under Player Owned Ships - The spawned ships are not noted

I open up the actual save and checked for myself. No Taranis was defined as owned by the Player.

The Balor showed up as:

Code: Select all

<component class="ship_l" macro="units_size_l_single_attack_ship_macro" connection="space" owner="player" knownto="player" id="[0x7c46]">
I spawned 2 more ships and got Gangrene Chasers - Easy enough to search if the player owns those and the crew names are distinctive.
I ended up finding the spawned ships via the crew, they show up as 'owned' by the player but the ship is not.

Ship - Split Chaser

Code: Select all

<component class="ship_xl" macro="units_size_xl_split_m1_macro" connection="space" owner="familyryak" knownto="player" id="[0x18900]">
Crew -

Code: Select all

<component class="npc" macro="character_split_m_a_macro" connection="commandroomslot" name="Chi t'Pst" owner="player" page="10201" id="[0x18929]">

Ship - Taranis

Code: Select all

<component class="ship_xl" macro="units_size_xl_capital_destroyer_2_macro" connection="space" attacker="[0x90a6]" attackmethod="hitbybullet" attacktime="1943.67" owner="plutarch" knownto="player" id="[0x8ed1]">
Crew:

Code: Select all

<component class="npc" macro="character_ar_male_pilot_macro" connection="commandroomslot" name="Jo Jorwan" owner="player" page="10107" id="[0x8eea]">
Jo Jorwan commands the Taranis which I made the commander of the fleet, including the Chasers.
I made myself the commander of the Taranis and spawn enemies - They all started launching drones and fighting.
I made myself the commander of the Balor that I built - It did not do anything but follow me around

Obvious question:
If spawned ships are the only method of actually making ships fight, can this spawn method be tied to the shipyards ?

I would rather have a shipyard that makes ships appear, fully equipped for a price that work than the current versions that do not work at all.
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

PREDATOR490 wrote:Question: Do the ships have to be set a commander using the ingame system ?
If so: who are you meant to set as the commander - The Captain or the Defense Officer ?
No, you do not have to set the commander. The UFO scripts actually remove the commander once they are started.
PREDATOR490 wrote:Obvious question:
If spawned ships are the only method of actually making ships fight, can this spawn method be tied to the shipyards ?

I would rather have a shipyard that makes ships appear, fully equipped for a price that work than the current versions that do not work at all.
That is indeed very curious. I have no idea why the mod would not work with ships that are not spawned via the UFO Test Tool. I have also no idea why the ships are not showing as owned by you in the savegame.

I'll start testing the mod with ships that have actually been built by shipyards. Since I haven't really played the game much, can anybody tell me where I can find a shipyard in Albion?
hkks
Posts: 3
Joined: Fri, 29. Nov 13, 11:02

Post by hkks »

Mad_Joker wrote:
PREDATOR490 wrote:Question: Do the ships have to be set a commander using the ingame system ?
If so: who are you meant to set as the commander - The Captain or the Defense Officer ?
No, you do not have to set the commander. The UFO scripts actually remove the commander once they are started.
PREDATOR490 wrote:Obvious question:
If spawned ships are the only method of actually making ships fight, can this spawn method be tied to the shipyards ?

I would rather have a shipyard that makes ships appear, fully equipped for a price that work than the current versions that do not work at all.
That is indeed very curious. I have no idea why the mod would not work with ships that are not spawned via the UFO Test Tool. I have also no idea why the ships are not showing as owned by you in the savegame.

I'll start testing the mod with ships that have actually been built by shipyards. Since I haven't really played the game much, can anybody tell me where I can find a shipyard in Albion?
AL>AL.AS>AL.AS.2>have ship dockyard

Return to “X Rebirth - Scripts and Modding”