[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

Joleoo
Posts: 16
Joined: Thu, 28. Nov 13, 21:42
x4

Post by Joleoo »

Mad_Joker wrote:
Joleoo wrote:
Mad_Joker wrote:Ladies and Gents,

I have just released UFO V0.2.0. It features the possibility to assign orders to your fleet, controlling how they will behave in case of enemy contact.

Hafe vun!

Nice to see updates rolling out so quickly. :)

I'm still having trouble getting this mod to work though. When I assign my ships to a fleet, the guns stay blue and the ship refuses to attack anything. The broadcast orders don't seem to do anything at all.

I feel like I've done something wrong, any tips?
Do you get any messages on the even monitor, like "Order Acknowledged"? To which ship are you trying to assign ships? Also, remember that currently the commander of the fleet doesn't do anything, you have to command him to do something via MCE.
I do get the "Order Acknowledged" window in my little screen thingymabob. When I give orders via MCE my ships just turns its back on me and flies away, even when I give the escort command. It's like my crew are all pacifists and are silently judging me when I try and get them to attack.

I tested it with a Taranis on a Plutarch mining vessel. The Taranis approached me with the escort command, all guns blue. The mining vessel opened fire on the Taranis which just ignored it. I tried choosing the "offensive" fleet commands (which did nothing), as well as the "escort" and "patrol" commands in MCE, both of which caused my Taranis to turn around and fly away from the mining vessel.

At one point I tried to use the CSE mod to see if that would work and then things got really strange, with my Taranis looming ominously close to the mining vessel, with its guns flashing between red and blue. Very strange.
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

I have uploaded my test scripts to the Nexus so that you can test the mod yourselves like you saw in my video.

Oh, and if you want to help debugging this, what you can do is add "-debug all -logfile rebirth.log" to your launch options in Steam, then open the UFO.xml file and in the first cue set the debug level to 3. Then assign all your ships to commanders again. You should then get a very detailed debug output in the rebirth.log file (which is in MyDocuments/Egosoft/X Rebirth/<randomnumber>.

You can find example debug output here (filtered by using a regex).
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

so far i have tested the script the same way you did in your video. i found a sector with only 5 fighters in it and no capital ships and my fleet is just sitting there taking hits. or do the capital ships only attack capital ships? that would explain why my ships arent returning fire.
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

Thanks. Ive been having issues getting this to work. I have a feeling there is a mod conflict going on somewhere. Will report back soon.
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

i found a few errors and it looks like my captials arent given any order due to a script file not being found?

Code: Select all

=ERROR=] Error in MD cue md.UFO.UFO_SectionHandler_AssignCommander: Evaluated value 'null' is not of type component
* Expression: $oSubordinate.defencenpc
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::LaunchTask(): AI script name 'ufo.fight.capital.defend' not found!
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::LaunchTask(): AI script name 'ufo.fight.capital.defend' not found!
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.UFO.UFO_SectionHandler_BroadcastOrder: Evaluated value 'null' is not of type component
* Expression: $oShip.defencenpc
[General] ======================================
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

darthmoll wrote:i found a few errors and it looks like my captials arent given any order due to a script file not being found?

Code: Select all

=ERROR=] Error in MD cue md.UFO.UFO_SectionHandler_AssignCommander: Evaluated value 'null' is not of type component
* Expression: $oSubordinate.defencenpc
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::LaunchTask(): AI script name 'ufo.fight.capital.defend' not found!
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::LaunchTask(): AI script name 'ufo.fight.capital.defend' not found!
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.UFO.UFO_SectionHandler_BroadcastOrder: Evaluated value 'null' is not of type component
* Expression: $oShip.defencenpc
[General] ======================================
Are you sure that you have a defence officer assigned to the ship that you are trying to add to a fleet? Capital ships will not fight if they do not have a defence officer (not sure if that causes the 'script not found' error as well though).
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

Mad_Joker wrote:
darthmoll wrote:i found a few errors and it looks like my captials arent given any order due to a script file not being found?

Code: Select all

=ERROR=] Error in MD cue md.UFO.UFO_SectionHandler_AssignCommander: Evaluated value 'null' is not of type component
* Expression: $oSubordinate.defencenpc
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::LaunchTask(): AI script name 'ufo.fight.capital.defend' not found!
[General] ======================================
[General] ======================================
[=ERROR=] AIDirector::LaunchTask(): AI script name 'ufo.fight.capital.defend' not found!
[General] ======================================
[General] ======================================
[=ERROR=] Error in MD cue md.UFO.UFO_SectionHandler_BroadcastOrder: Evaluated value 'null' is not of type component
* Expression: $oShip.defencenpc
[General] ======================================
Are you sure that you have a defence officer assigned to the ship that you are trying to add to a fleet? Capital ships will not fight if they do not have a defence officer (not sure if that causes the 'script not found' error as well though).
out of 2 ships i have 1 defense officer. going to add another defense officer to the other ship. hope that helps. but i thought at least 1 ship would have to attack as there is a defence officer there. i will report back once both ships have a defence officer on them. i forgot 1 ship to add it to
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

I have just realized that my test scripts contained a rather annoying bug :oops:

It causes you to be unable to spawn capital ships for you or the enemy more than once. I have re-uploaded a fixed version to the Nexus. If you had them downloaded before, please do so again now.
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

The error codes have disseared. now i only get this text wich seems good but my fleet is still not attacking. does it mater in what sector i am in due to what ships respawn and if htey are ememies to me or not??

Code: Select all

General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49762.6 - Taranis - Defence Officer Selina Williams] Checking for enemies to engage in 5500m...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49762.6 - Taranis - Defence Officer Selina Williams] No enemies to engage in 5500m. Going back to sleep...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49762.6 - Taranis - Defence Officer Selina Williams] Sleeping...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.move.capital.escort.any,0x1AE9>: [49762.6 - Taranis - Captain Kriss Springer] Checking for enemies to engage in 5500m...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.move.capital.escort.any,0x1AE9>: [49762.6 - Taranis - Captain Kriss Springer] No enemies in engage distance (5500m). Aborting...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.move.capital.follow.any,0x1AE9>: [49763 - Taranis - Captain Kriss Springer] One of our protection targets was attacked. Checking gravidar depending on mode: aggressive...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49763 - Taranis - Defence Officer Selina Williams] One of our protection targets was attacked. Checking gravidar...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49763 - Taranis - Defence Officer Selina Williams] Checking for enemies to engage in 5500m...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49763 - Taranis - Defence Officer Selina Williams] No enemies to engage in 5500m. Going back to sleep...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49763 - Taranis - Defence Officer Selina Williams] Sleeping...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.move.capital.escort.any,0x1AE9>: [49763 - Taranis - Captain Kriss Springer] Checking for enemies to engage in 5500m...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.move.capital.escort.any,0x1AE9>: [49763 - Taranis - Captain Kriss Springer] No enemies in engage distance (5500m). Aborting...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.move.capital.follow.any,0x1AE9>: [49764 - Taranis - Captain Kriss Springer] One of our protection targets was attacked. Checking gravidar depending on mode: aggressive...
[General] ======================================
[General] ======================================
[=ERROR=] aicontext<ufo.fight.capital.defend,0x16B2>: [49764 - Taranis - Defence Officer Selina Williams] One of our protection targets was attacked. Checking gravidar...
the enemy ships that have spawned are about 30 miles away from me. so they should attack no?

also changed the code as you stated in a few posts back.
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

Same here. According to tests with debug commands, ships still don't attack mission enemies even with fix a few posts back. Will do some more testing.
hkks
Posts: 3
Joined: Fri, 29. Nov 13, 11:02

Post by hkks »

hkks wrote:nice video, but the ship just follow me
maybe something conflict, i try again
good job guys, my list is too long...
http://www.fotopu.com/img/1/479859.jpg


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
Only use your test MOD boat to attack
MOD unchanged
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

Ladies and Gents,

I have just released V0.3.0 which features many small improvements.

Another thing I should have mentioned is "engage distances". Currently, it is not possible to tell a captain/pilot/defence officer at which range they should engage enemies. This is currently set to 9km for Capital ships, and 5.5km for fighters. The scripts already support changing that value, but there is simply not yet a menu option to change it. This will be added in the future.

Until then, hafe vun!
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

Tested .20 with following mods

Hull Engineer
Component Fix
CSE
MSE
Improved Fleets
Defense Upgrade (My own personal attemps at fixing ai fight behavior)
UFO
UFO Test

Almost everything works fine, ships assigned as subordinate detect attacks properly, and add attackers to their target list.

MSE and UFO caused subordinate ships not to properly follow, either in MSE follow mode or add as subordinate mode. Attacking and responding to attacks worked properly.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

A few questions for those having trouble with your ships fighting back. Are the enemeis within 5.5km of the ship in question? For example if you're 10km away from your taranis and you get hit, taranis won't fight back.

For the enemy check to work, the target must have kill relation to you or less. This translates to -20 to -30 effective relationship. IF you have the ship you want your ships to attack targetted and its relation is above -20 your ships won't consider it a valid target. NPCs use the same check by the way, so if they attack you first this case should be true. By default xenon, syndicate, criminal and generic enemy ships start around -26 or so.

darth, from your post it seems that either the enemies are out of range or not meeting rep requirements.
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

Kierk wrote:Tested .20 with following mods

Hull Engineer
Component Fix
CSE
MSE
Improved Fleets
Defense Upgrade (My own personal attemps at fixing ai fight behavior)
UFO
UFO Test

Almost everything works fine, ships assigned as subordinate detect attacks properly, and add attackers to their target list.

MSE and UFO caused subordinate ships not to properly follow, either in MSE follow mode or add as subordinate mode. Attacking and responding to attacks worked properly.
I guess you mean MCE? :)

Also, in what sense were they not following properly?
Kierk wrote:A few questions for those having trouble with your ships fighting back. Are the enemeis within 5.5km of the ship in question? For example if you're 10km away from your taranis and you get hit, taranis won't fight back.

For the enemy check to work, the target must have kill relation to you or less. This translates to -20 to -30 effective relationship. IF you have the ship you want your ships to attack targetted and its relation is above -20 your ships won't consider it a valid target. NPCs use the same check by the way, so if they attack you first this case should be true. By default xenon, syndicate, criminal and generic enemy ships start around -26 or so.

darth, from your post it seems that either the enemies are out of range or not meeting rep requirements.
In version V0.3.0 the relation is now set to enemy or less, which is less than -10 I believe (if you don't want them to attack those, set your ships to defensive mode).

The engage distance should become configurable soon as well hopefully.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

A few questions for those having trouble with your ships fighting back. Are the enemeis within 5.5km of the ship in question? For example if you're 10km away from your taranis and you get hit, taranis won't fight back.

For the enemy check to work, the target must have kill relation to you or less. This translates to -20 to -30 effective relationship. IF you have the ship you want your ships to attack targetted and its relation is above -20 your ships won't consider it a valid target. NPCs use the same check by the way, so if they attack you first this case should be true. By default xenon, syndicate, criminal and generic enemy ships start around -26 or so.

darth, from your post it seems that either the enemies are out of range or not meeting rep requirements.
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

Kierk wrote:A few questions for those having trouble with your ships fighting back. Are the enemeis within 5.5km of the ship in question? For example if you're 10km away from your taranis and you get hit, taranis won't fight back.

For the enemy check to work, the target must have kill relation to you or less. This translates to -20 to -30 effective relationship. IF you have the ship you want your ships to attack targetted and its relation is above -20 your ships won't consider it a valid target. NPCs use the same check by the way, so if they attack you first this case should be true. By default xenon, syndicate, criminal and generic enemy ships start around -26 or so.

darth, from your post it seems that either the enemies are out of range or not meeting rep requirements.
the enemy's are xenon. they are at -27 with me. the ships that i bought and have 1 captain and 1 defense officer (2 arawns) will not fight for me BUT, if i use the cheat tool from joker and i spawn 2 fleets for player. add them to the UFO group. then those ships will fight. so i have no idea whats going on. maybe this is still a bug in the game.

i am running 1.17 patch with hotfix.
and 5 extensions running.
1. Complete Station Info Unlocks
2. Ignore jump drive fuel
3. MCE
4. UFO
5. UFO test script
6. [Work In Progress] Functional Trader + stable supply/demand


now you tell me what i am doing wrong cause i dont know.
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

darthmoll wrote:
Kierk wrote:...
the enemy's are xenon. they are at -27 with me. the ships that i bought and have 1 captain and 1 defense officer (2 arawns) will not fight for me BUT, if i use the cheat tool from joker and i spawn 2 fleets for player. add them to the UFO group. then those ships will fight. so i have no idea whats going on. maybe this is still a bug in the game.

i am running 1.17 patch with hotfix.
and 5 extensions running.
1. Complete Station Info Unlocks
2. Ignore jump drive fuel
3. MCE
4. UFO
5. UFO test script
6. [Work In Progress] Functional Trader + stable supply/demand


now you tell me what i am doing wrong cause i dont know.
At which distance from your ships were those Xenon? ALso, can you please follow the directions from my post below? Then you should be able to see why the ships are not engaging anyone.
Mad_Joker wrote:I have uploaded my test scripts to the Nexus so that you can test the mod yourselves like you saw in my video.

Oh, and if you want to help debugging this, what you can do is add "-debug all -logfile rebirth.log" to your launch options in Steam, then open the UFO.xml file and in the first cue set the debug level to 3. Then assign all your ships to commanders again. You should then get a very detailed debug output in the rebirth.log file (which is in MyDocuments/Egosoft/X Rebirth/<randomnumber>.

You can find example debug output here (filtered by using a regex).
User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll »

the distance between my ships and the enemy are 3 miles.

i have set the debug to 3


debug output herehttp://pastebin.com/i02EQaUE
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

Ladies and Gents,

I have just released hotfix version V0.3.1 which fixes a screwup from me that causes capital ships being unable to follow you into other sectors/clusters. I also disabled jump fuel requirements for now until I can come up with a more elegant way of handling jump fuel (like making the needed amount based on navigation skill of captain and science skill of engineer).

Hafe vun!

Return to “X Rebirth - Scripts and Modding”