[mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

The place to discuss scripting and game modifications for X4: Foundations.

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

Post Reply
kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

[mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by kuertee » Sat, 22. Aug 20, 18:34

I have v0.9.0 versions of mods that I'd appreciate some feedback on before releasing them to the wider public on Nexus. I have to still build their Nexus pages (e.g. create images for them) and want to play with them a bit more.

1. Alternatives to death: https://drive.google.com/file/d/1QbyAZV ... sp=sharing
Alternatives to death: clone, descendant, teleport, ransom, assimilation. Other gameplay effects: ship destruction countdown, Cloning Lab, Trust Executor Office, acquire Cr to inherit property, acquire your assimilator's faction relationships.
Spoiler
Show
Alternatives to death v0.9.0 beta
https://www.nexusmods.com/x4foundations/mods/551
by kuertee

Mod effects:
============
Alternatives to death: clone, descendant, teleport, ransom, assimilation. Other gameplay effects: ship destruction countdown, Cloning Lab, Trust Executor Office, acquire Cr to inherit property, acquire your assimilator's faction relationships.

Requirements:
=============
SirNukes Mod Support APIs mod (https://www.nexusmods.com/x4foundations/mods/503) - to load the custom Lua files
Kuertee's UI Extensions mod (https://www.nexusmods.com/x4foundations/mods/552) - Modded Lua files with callbacks to allow more than one mod to change the same UI element.

Alternatives to death:
======================
When a ship receives constant damage that would destroy it within the next 15 seconds, a 30-second countdown will appear in your HUD.

If you get caught in the ship's destruction, one of these alternatives to death will occur:

Alternative 1: Clone: If you have a clone in reserve, it will be activated. Clones can be bought from Cloning Labs.
Alternative 2: Descendant: Your play will resume from the agency of a distant relation.
Alternative 3: Teleport: An employee will pull you to safety via their ship's or station's teleporter - provided you are in possession of that technology.
Alternative 4: Ransom: You are captured and are released for a ransom.
Alternative 5: Assimilation: You are brainwashed (by one of the major factions), assimilated (by the Xenon) or cordycepified (by the Kha'ak).

Note that these alternatives will prevent the Game Over screen. However, if you've disabled some alternatives and none of them can be executed, you will get the Game Over screen. For example: you're only playing with the Clone option, but have no clones available.

Clones and descendants:
=======================
Your clones and descendants will not automatically acquire your ships and stations. These will be held in a trust, which your clones and descendants can inherit after acquiring 1,000,000 Cr. Your Trust Executor will notify them of this will.

Ransom payment:
===============
You will lose 25% of your property as payment for you ransom.

Assimilation:
=============
You will acquire your assimilator's faction relationships.

When captured by one of the major factions, your mind will be wiped and incepted with their philosophy. When captured by the Xenon, you will be turned into a cyborg and programmed to hate all organic beings. When captured by the Kha'ak, you will be infected by their cordyceps and zombified into one of their drones.

Cloning Lab:
============
Buy reserve clones from cloning labs. Not all stations has a lab.

Trust Executor's Office:
========================
You can claim your inheritance from the Trust Executor. Their offices will be in one of the major faction's headquarters. They will only be available when you have an inheritance to claim.

Configure the mod:
==================
Most of these features can be modified in the Extensions Options screen.

Install:
========
-Unzip to 'X4 Foundations/extensions/kuertee_alternatives_to_death/'.
-Make sure the sub-folders and files are in 'X4 Foundations/extensions/kuertee_alternatives_to_death/' and not in 'X4 Foundations/extensions/kuertee_alternatives_to_death/kuertee_alternatives_to_death/'.
-If 'X4 Foundations/extensions/' is inaccessible, try 'Documents/Egosoft/X4/XXXXXXXX/extensions/kuertee_alternatives_to_death/' - where XXXXXXXX is a number that is specific to your computer.

Uninstall:
==========
-Delete the mod folder.
2. Teleport from transporter: https://drive.google.com/file/d/1Ag2u1X ... sp=sharing
Adds a Teleport button in your transporters. By default, removes the "Teleport to" command from the Map Menu. By default, disallows teleportation to and from allied properties.
Spoiler
Show
Teleport from transporter v0.9.0 beta
https://www.nexusmods.com/x4foundations/mods/553
by kuertee

Mod effects:
============
Adds a Teleport button in your transporters. By default, removes the "Teleport to" command from the Map Menu. By default, disallows teleportation to and from allied properties.

Requirements:
=============
SirNukes Mod Support APIs mod (https://www.nexusmods.com/x4foundations/mods/503) - to load the custom Lua files
Kuertee's UI Extensions mod (https://www.nexusmods.com/x4foundations/mods/552) - Modded Lua files with callbacks to allow more than one mod to change the same UI element.

Configure the mod:
==================
From the Extensions Options screen:
1. Enable the "Teleport to" command in the Map Menu,
2. Allow teleportation to and froom allied properties.

Install:
========
-Unzip to 'X4 Foundations/extensions/kuertee_teleport_from_transporter/'.
-Make sure the sub-folders and files are in 'X4 Foundations/extensions/kuertee_teleport_from_transporter/' and not in 'X4 Foundations/extensions/kuertee_teleport_from_transporter/kuertee_teleport_from_transporter/'.
-If 'X4 Foundations/extensions/' is inaccessible, try 'Documents/Egosoft/X4/XXXXXXXX/extensions/kuertee_teleport_from_transporter/' - where XXXXXXXX is a number that is specific to your computer.

Uninstall:
==========
-Delete the mod folder.
3. UI Extensions: https://drive.google.com/file/d/1bk6hfk ... sp=sharing
Modded Lua files with callbacks to allow more than one mod to change the same UI element. Functionality to add new HUD elements to the Top Level Menu.
Spoiler
Show
UI Extensions and HUD v0.9.0 beta
https://www.nexusmods.com/x4foundations/mods/552
by kuertee

Mod effects:
============
Modded Lua files with callbacks to allow more than one mod to change the same UI element. Functionality to add new HUD elements to the Top Level Menu.

Documentation:
==============
Soon.

But the callbacks, along with their function parameters and their expected returns, are listed in each of the new Lua files. Learning at which point in the code they execute is as easy as searching for them in the code. Examples on how they are used can be seen in my mods that use them. My mods "High security rooms are locked" and "Teleport from transporter" both have changes to the "TransporterMenu". With "UI Extensions and HUD", the changes from both mods can be applied. Without "UI Extensions and HUD", only one could.

Requirement:
============
SirNukes Mod Support APIs mod (https://www.nexusmods.com/x4foundations/mods/503) - to load the custom Lua files

Install:
========
-Unzip to 'X4 Foundations/extensions/kuertee_ui_extensions/'.
-Make sure the sub-folders and files are in 'X4 Foundations/extensions/kuertee_ui_extensions/' and not in 'X4 Foundations/extensions/kuertee_ui_extensions/kuertee_ui_extensions/'.
-If 'X4 Foundations/extensions/' is inaccessible, try 'Documents/Egosoft/X4/XXXXXXXX/extensions/kuertee_ui_extensions/' - where XXXXXXXX is a number that is specific to your computer.

Uninstall:
==========
-Delete the mod folder.


All mods work. The only functionality I've not tested is the "assimilation" feature of "Alternatives to death". I don't know what happens when you are killed by the khaak or xenon - apart from that you will acquire their faction relations.

Both 1 and 2 require "UI Extensions" - modding resource that I'm developing that allows more than one mod to change the same UI menu. Also, functionality, albeit an early version, that allows modders to add new HUD elements. I use it for the destruction countdown in the "Alternatives to death" mod.

A good test for "Alternatives to death" is to simply get yourself killed.

Any feedback, comment or actual game experience, is appreciated. Thank you.

EDIT: if you have the game logging debugs, you can set mods 1 and 2 to output their own debug lines in their Extensions Options screen.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by kuertee » Sun, 23. Aug 20, 04:18

I forgot to set the sharing settings on those Google Drive links.
I have now set it so that anyone with those links can access its file.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 410
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by Mycu » Sun, 23. Aug 20, 09:17

Really nice!
I'll play with it on today's evening gaming session.

First one looks like a good and advanced replacement for escape teleport mod. With much variety and configuration. Wonderful.
From reading the description of "Teleport from transporter" mod I don't fully understand how it works (transporter is a freighter? where is this button placed, in context menu?) - but I will sure got it after trying.

Thanks for creating those. I'll be back with some feedback.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by kuertee » Sun, 23. Aug 20, 10:17

Mycu wrote:
Sun, 23. Aug 20, 09:17
...transporter is a freighter? ...
I meant Transporter Room. :wink:
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 410
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by Mycu » Sun, 23. Aug 20, 12:50

Okay, I couldn't hold out till evening ;)
I started the game for a while to test Teleport from transporter, but there was no teleport option in my ship Transporter Room despite the "Allow teleportation to and from allied properties" option enabled.
https://i.imgur.com/ww1ROz3.png

This is my log file (with debug from mod enabled): https://pastebin.com/kWayZvwB
I've filtered out unnecessary signature entries.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by kuertee » Sun, 23. Aug 20, 13:11

Mycu wrote:
Sun, 23. Aug 20, 12:50
...This is my log file (with debug from mod enabled): https://pastebin.com/kWayZvwB...
Thank you. I didn't see this line: "kuertee_menu_transporter.init isInited". Was that line in what you filtered out?
The UI Extensions mod is required for both my new mods.

EDIT: Actually, that line is there, sorry. Let me look at the log closer.
Last edited by kuertee on Sun, 23. Aug 20, 13:26, edited 1 time in total.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 410
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by Mycu » Sun, 23. Aug 20, 13:15

kuertee wrote:
Sun, 23. Aug 20, 13:11
I didn't see this line: "kuertee_menu_transporter.init isInited". Was that line in what you filtered out?
Ups, sorry - filtering got out of control.
Here's full log: https://easyupload.io/quiw2w
kuertee wrote:
Sun, 23. Aug 20, 13:11
The UI Extensions mod is required for both my new mods.
Yes, got it installed.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

Mycu
Posts: 410
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by Mycu » Sun, 23. Aug 20, 15:18

Also tried "Alternatives to death" mod, and found a bug.

When attacked, the 30s counter is fired properly but damage goes down to 1% and then stops (my ship is indestructible) until counter reaches 0s. Then ship is destroyed.
Here's a footage: https://streamable.com/x0osdy
And a log file with mod debug enabled: https://easyupload.io/egg78e

Also, one of tries gave a null in post death message: https://i.imgur.com/uuqwYbP.png
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by kuertee » Sun, 23. Aug 20, 16:15

Mycu wrote:
Sun, 23. Aug 20, 15:18
...When attacked, the 30s counter is fired properly but damage goes down to 1% and then stops (my ship is indestructible) until counter reaches 0s. Then ship is destroyed...Also, one of tries gave a null in post death message: https://i.imgur.com/uuqwYbP.png
Thank you again. The indestructible ship is on purpose. Otherwise, the Game Over screen will appear and will terminate your play. The 30s countdown (even if the mod starts it when it *assumes* the ship will be destroyed within 15s - with this calculation: hull-per-second-damage received * 15 greater than hull) is just to give the player enough ACTUAL time to leave the seat, go to the transporter room, and choose a teleport destination or to eject with the spacesuit.

Did the Teleport from transporter room eventually work? Or no? The mod checks whether the button should be available or not when you enter/exit rooms. E.g. the cockpit and dock areas of a ship are considered rooms.

One thing I noticed in your video is that the cutscene destruction is too short. I use the cutscene as "smoke and mirrors" - so that the player doesn't "see" what actually happens when my mod "saves" them from the game over screen. Or did you manage to cancel the cutscene with the ESC button?

I'll do more checks with that notification. It should say "<Station manager name> has teleported you to safety." Do you know if that station has a manager? EDIT: Never mind. I found the bug for this one.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 410
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mod] pre-release beta versions: Alternatives to death, Teleport from transporter, UI extensions

Post by Mycu » Sun, 23. Aug 20, 17:21

kuertee wrote:
Sun, 23. Aug 20, 16:15
The indestructible ship is on purpose. Otherwise, the Game Over screen will appear and will terminate your play. The 30s countdown (even if the mod starts it when it *assumes* the ship will be destroyed within 15s - with this calculation: hull-per-second-damage received * 15 greater than hull) is just to give the player enough ACTUAL time to leave the seat, go to the transporter room, and choose a teleport destination or to eject with the spacesuit.
Classical "it's not a bug it's a feature" :D
Your explanation makes perfect sense.
Especially, that even if I manage to run away with my ship before counter reaches zero - it gets destroyed.
Nice.

kuertee wrote:
Sun, 23. Aug 20, 16:15
Did the Teleport from transporter room eventually work? Or no? The mod checks whether the button should be available or not when you enter/exit rooms. E.g. the cockpit and dock areas of a ship are considered rooms.
No, it doesn't show.
Moreover I've found my transporter room menu not working - clicking on "Travel to" button doesn't work same as double click.
Doesn't work on ships and stations.

kuertee wrote:
Sun, 23. Aug 20, 16:15
One thing I noticed in your video is that the cutscene destruction is too short. I use the cutscene as "smoke and mirrors" - so that the player doesn't "see" what actually happens when my mod "saves" them from the game over screen. Or did you manage to cancel the cutscene with the ESC button?
No, I haven't pressed ESC. And pressing ESC doesn't interrupt this cutscene.

And two more little ones found:
%1: https://i.imgur.com/CgifVkc.jpg
Good morning has died ;) https://i.imgur.com/JdIBsax.png
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

Post Reply

Return to “X4: Foundations - Scripts and Modding”