[SCRIPT]----Regenerative Hull Systems----[Updated v1.41: 24-07-06] {EMP}

The place to discuss scripting and game modifications for X³: Reunion.

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

Good idea or bad idea?

Good idea
134
82%
Good idea but needs balance (suggestions please)
25
15%
Bad idea - Could be good with...... [suggestion - please post]
1
1%
Bad idea because of..... [reason - please post]
3
2%
 
Total votes: 163

Kvalyr
Posts: 330
Joined: Sun, 1. May 05, 15:56
x4

[SCRIPT]----Regenerative Hull Systems----[Updated v1.41: 24-07-06] {EMP}

Post by Kvalyr » Wed, 4. Jan 06, 02:38

////////////////--Boron-Paranid Regenerative Hull Systems v1.41 for X3 - Reunion--/////////////////
Version 1.41 - 24/July/2006

////////////////--Author: Zurechial

v1.41 now available:



Zip Format for manual installation:
--
Download Plugin -- Alternative Mirror


SPK format for use with Cycrow's X Script Manager:
--
Download Plugin -- Alternative Mirror

================
================

This Plugin uses the EMP Modpack and will not work without it being installed.


////////////////--Basic Concept:
AHR-Extension: Automatically self-repairs whichever ship it's installed into, at a rate dependent on the ship-size.
CMH-Extension: Mounted only on TL & M1 ships - Repairs all ships docked within the carrier automatically, but 'costs' energy cells - Can also repair external ships (All ships, M5s to M2s) for a cost in energy cells dependent on the size of the ship to be repaired.

Tables of time-taken to repair and energy cell costs can be found below.

////////////////-------////////////////

Updated to work with and require the {EMP}
Includes German translation by StarTrekMarc - Thanks Marc.

**Users of pre-EMP versions (anything before 1.3) will need to replace now-defunct "ReadText" wares from the last version in their ships' inventories with wares from the new version.
This is caused by the changeover to EMP since it involved changing to a new pair of ware-templates/slots in the game.

::
Below is a link to a script that will place the 2 extensions into your ship, for those of you who already bought the extensions in a previous version.
You need only run the script, and then eject the "ReadText" wares from your ship's freight bay.
This should have no other affect on savegames.

Extension-replacement script

Instructions:
1. Extract the .xml file from the zip to your X3 scripts folder
2. Run the script from the in-game script editor by accessing it through your ship-commands menu and pressing the R key with the AAAZInstallAHRCMH script highlighted
3. Select the ship you want to give the extensions to in both menus that come up
4. Return to the game and eject the defunct "ReadText" wares from your ship's freight-bay


////////////////--Change log:
v1.41
--Changed race-check to use my z.lib.getshiprace library and added it to the package.
v1.40
--Added race-specific bonuses and penalties to repair-efficiency.
v1.31
--Added distance-limitation to external-repair CMH command
--Added extra feedback from CMH to player
v1.3
--Updated for use with {EMP}
v1.21
--Added German Translation by StarTrekMarc
v1.2
--Enabled CMH
--Added CMH strings
--Changed from Silicon & Teladianium to Energy cells for practicality.
v1.1
--Added CMH framework
--Optimised CMH & AHR
v1.0
--Initial Release


////////////////--Known Issues/Bugs/Conflicts

Issues:
--None to my knowledge.
Bug-reports are welcome.

-----Concept-----

Boron-Paranid Autonomous Hull-Repair System (AHR):

-This is a system developed through collaborative research by Boron & Paranid scientists, based on their pre-existing semi-organic hull-designs.
-The system works by embedding silicon/teladianium-based nano-organisms in the molecular gaps of the ship's existing hull upon installation, through surface-locomotion of particles.
-The organisms store the structural information of the original hull-molecules they come in contact with and constantly relay this information back to the ship-computer through a network of electrical signals.
-When sections of the hull are damaged, the ship-computer initiates the restoration protocol and the organisms use their stored information to chemically metamorphose into a substance similar to the original hull, to replace the damaged sections.
-The system has 2 main limitations:
----It will only function when hull-integrity is above 50%, as too much molecular data is lost at any point below 50% integrity.
----The time taken to grow, regrow and metamorphose the nano-organisms is too long for combat-sustainability.
(It takes approximately 100 seconds of real-time (10 seconds of 10x SETA) to fully restore the hull of an average M5-class ship. This length of time scales upwards with the hull-mass of the ship, thus it would take a considerable amount of time to restore 50% of the hull of a capital-class ship.)

Table of average time taken in seconds to restore hull from 50% to 100% integrity by ship-class:

Code: Select all

----------------------------------------------------------------------------------------
||       Ship-Class:          ||      Time taken (Real-time)     ||      Time taken (SETA 10x)
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
||       M5                   ||       100s (1.7 Minutes)        ||       10s
----------------------------------------------------------------------------------------
||       M4                   ||       250s (4.2 Minutes)        ||       25s
----------------------------------------------------------------------------------------
||       M3                   ||       400s (6.7 Minutes)        ||       40s
----------------------------------------------------------------------------------------
||       TS                   ||       600s (10 Minutes)         ||       60s (1 Minute)           
----------------------------------------------------------------------------------------
||       TP                   ||       600s (10 Minutes)         ||       60s (1 Minute)           
----------------------------------------------------------------------------------------
||       M6                   ||       1200s (20 Minutes)        ||       120s (2 Minutes)           
----------------------------------------------------------------------------------------
||       TL                   ||       1500s (25 Minutes         ||       150s (2.5 Minutes)           
----------------------------------------------------------------------------------------
||       M1                   ||       2500s (42 Minutes)        ||       250s (4.2 Minutes)           
----------------------------------------------------------------------------------------
||       M2                   ||       3000s (50 Minutes)        ||       300s (5 Minutes)           
----------------------------------------------------------------------------------------
The AHR system is subject to compatibility with the race/design of the ship that it is installed into.
This issue of compatibility affects the efficiency of the repair procedure, ultimately changing how long a full repair (50% to 100%) takes.
The differences in time taken to repair depending on ship-race are summed up below:

-Argon : 100% of Standard repair-time.
-Boron : 70%% of Standard repair-time.
-Paranid : 110% of Standard repair-time.
-Split : 120% of Standard repair-time.
-Teladi : 140% of Standard repair-time.
-Terran : 70% of Standard repair-time.
-Xenon : 50% of Standard repair-time.


The reasons for the differences are as follows:


-Argon : Argon ships are 100% compatible with the system, due to Boron collaboration, but the system is not fully optimised for use on Argon ships.
-Boron : The system is 100% compatible with, and fully optimised for use on, the Boron ships, resulting in vastly improved efficiency.
-Paranid : The system is 100% compatible with Paranid ships, but its efficiency is negatively affected by the rounded design of the Paranid ships and their greater surface area.
-Split : Split refusal to co-operate with Boron researchers means that the system isn't 100% compatible with their ships, causing a significant negative effect on the efficiency of the system.
-Teladi : Economy and cheap functionality come first for the Teladi, allowing for reduced costs in CMH repairs, but decreased efficiency for both the CMH and AHR.
-Terran : Differences in materials & technology increase the cost of repairs, but Terran ingenuity of design allows for efficient repair speeds.
-Xenon : Systematic & Efficient, the Xenon ships can be easily and automatically adapted for efficient use of the repair systems beyond any other race, even the Boron system-inventors.


Extension Cost: 9,110,822 Cr
Available: In Boron & Paranid Equipment-docks

Boron-Paranid Carrier-Mounted Hull-Repair System (CMH):

-An adaptation of the Autonomous Hull-Repair system for use on TL & Carrier-Class ships which allows the Carrier-ship to repair other ships by similar nano-organic means to the AHR, without having to install the AHR system on each ship.
-The CMH also incorporates some of the existing repair-technology from shipyards to allow it to perform repairs on a ship of any hull-integrity.
-This extension has 3 functions and 1 primary limitation:
---1---The Carrier-ship's scanners are adapted by the CMH system to read data taken from a cut-down version of the AHR which the carrier installs automatically on all ships docked within it. It uses this data to build up profiles of any ship with the CMH-Client and later repair the ships singly, when commanded, by means of Nano-organisms in conjunction with technology similar to the Goner Transporter device.
---2---The Carrier will automatically repair any ships which are currently docked in it while the CMH is installed.

--Limitations:
--1.The CMH system requires you to have a stock of energy cells in the Carrier-ship's cargo-bay to supplement the greater drain on the system than in the AHR system.
--2.The CMH system may only repair external ships within 8km of the ship it is installed on.


The following are tables of the Energy cell costs for the various ship-types, per ship repaired:


Repair Procedure on internal and external ships:

Code: Select all

----------------------------------------------------------------------
||       Ship-Class:          ||       Energy Cells Required        ||
----------------------------------------------------------------------
----------------------------------------------------------------------
||       M5                   ||       1250                         ||
----------------------------------------------------------------------
||       M4                   ||       5000                         ||
----------------------------------------------------------------------
||       M3                   ||       7500                         ||
----------------------------------------------------------------------
||       TS                   ||        10'000                        ||
----------------------------------------------------------------------
||       TP                   ||        10'000                       ||
----------------------------------------------------------------------
||       M6                   ||       25'000                       ||
----------------------------------------------------------------------
||       TL                   ||        40'000                       ||
----------------------------------------------------------------------
||       M1                   ||       55'000                       ||
----------------------------------------------------------------------
||       M2                   ||       60'000                       ||
----------------------------------------------------------------------



Extension Cost: 1,002,677 Cr
Available: In Boron & Paranid Equipment-docks


-----Usage & Limitations-----

--Neither the AHR nor the CMH Systems are used by AI-Ships (NPCs) and the AHR should not be used on more than about 20 of the player ships at any one time.
The reason for this is that, though I've done my best to optimise it, the script probably doesn't scale well when used on large numbers of ships.
--The CMH should only be installed on a small number of TLs or Carriers at any one time for the same reason, but the CMH can be used to repair just about any number of other ships without causing any problems, due to the ship-by-ship nature of its repair process.
--The CMH will not repair the hull of the Carrier-ship it is installed-in.
The AHR is required for self-repair of any ship.




-----Tech. Details-----

Uses the AL-engine to initiate the regeneration and place the wares in Paranid & Boron Equipment docks, instead of wasting a command-slot.

Wares used in {EMP} :
101 : 28;0;0;0;0;101;10253;0;35014;1;1;0;35014;-100;0;0;SS_WARE_SW_CUSTOM1_2;
115 : 28;0;0;0;0;115;10393;0;324115;1;1;0;324115;-100;0;0;SS_WARE_SW_CUSTOM15_2;

Text-file used:
8824

Command-slot used:
<t id="558">COMMAND_TYPE_SPECIAL_58</t>

Script filenames:
z.pregen.xml
z.pregenCMH.xml
z.targetedCMH.xml
al.z.regen.main.xml
al.plugin.z.pregen.xml

-----Progress-----

Check This thread

-----

Feedback & Suggestions Welcome.
Last edited by Kvalyr on Tue, 25. Jul 06, 18:02, edited 45 times in total.

Rasdan
Posts: 40
Joined: Sat, 19. Nov 05, 16:18
x3

Post by Rasdan » Wed, 4. Jan 06, 13:20

Great idea
However there are balance issues as you suggest.
I’m not a scripter, but I have some balancing ideas for the hull repairing tech:

Go with solution 1 make it work on all ships.
Make it so that it is one ship that repairs another ship via the command console.
It uses resources, preferably teladianium panels (they are in the game I found them in the SE).
I read somewhere that teladianium panels are used to make ship hulls.
The extension only installs on TL ship or bigger.

How it works

You have to buy the extension somewhere (eq docks) and install it on a TL or larger ship.
This makes sense to me, as they have docking bays to repair ships in
Should be expensive (4-6 million).
The ship then has the ability to repair other ships via the command console, special commands menu-> repair ship (or something like that).
When you activate the command you choose the ship you want to repair (sector map thing)
The TL then starts restoring the target ship hull by a percentage every X seconds until fully restored.
Every percentage needs a number of resources depending on the size of the target ship you are trying to repair.
If the TL repair ship (where the hull repair thing is installed on) runs out of resources it stops repairing and you get a message telling you that the TL needs more teladianium panels.
You then have to buy more somewhere (EQ dock).

All this will IMO balance the ship repair extension because:
1. You will need a big expensive ship to start with(TL or bigger).
2. It takes time. (not efficient in battle)
3. It needs resources (more expensive to repair bigger ships and you need to resupply).

Problems.
Need to add a new ware to stations (EQ Docks), and resuppy it when it runs out.
Need to find a suitable price for new ware.
Need to find a suitable amount of new ware used then repairing different ship types.

By the way I find the idea of 'critical' stage of damage excellent.

User avatar
LV
Sith Lord
Posts: 6358
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by LV » Wed, 4. Jan 06, 13:35

hehe nothing like a touch of defference, now stop it! :P

feel free to use my script if it helps, can't offer too much of an op as i only have time to skim posts but I always thought it was the boron with part organic ships :? or was that X2
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

Kvalyr
Posts: 330
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Wed, 4. Jan 06, 13:35

Rasdan: I like your idea, I think I'll take it on-board ;)

Though, I think I'll add it as an additional method of repair with the following advantages/disadvantages:

Adv:
-Faster than Regenerative Hull
-The ship being repaired doesn't need the extension
Disadv:
-More expensive than shipyard repair
-Slower than Shipyard repair (Set it to take 20 seconds or so)
-Expensive extension for repairing ship but not as expensive as the self-repair system

The problems you listed can also be easily dealt-with :D


The idea of using teladianium panels is a good one, but it made me think of using it as an additional method, as above, since it sort-of defeats the point of a semi-organic self-regenerative hull.
So now, with your idea, I have twice the work to do, but an end-product twice as good - At least that's the plan.
Thanks for the feedback & suggestions - Greatly appreciated. :)
(You'll be listed in the credits for this :P)
Last edited by Kvalyr on Wed, 4. Jan 06, 13:53, edited 1 time in total.

Kvalyr
Posts: 330
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Wed, 4. Jan 06, 13:47

Woops, LV posted while I was writing my last post :P

Thanks for the encouragement :)
I was using your scripts as a guideline for setting up the wares for my own, but then I realised that yours is using a ship-command to initialise the repair, whereas I want mine to constantly repair the ship when(current hull < max. hull) so I had to change how mine is initialised, but that was no big deal.

It's nice working with the MCSI when I look back on my days of writing mods for an old RPG in C++ Embedded JavaScript classes........ :sceptic:

I think it's the paranid who have the semi-organic hulls, while the Boron ships just *look* organic.
I could be wrong though, I should probably confirm it. :P

Rasdan
Posts: 40
Joined: Sat, 19. Nov 05, 16:18
x3

Post by Rasdan » Wed, 4. Jan 06, 14:06

Great !!! Cant wait to try it out
I'll be happy to help you test this script on my pc prior to public release.

Kvalyr
Posts: 330
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Wed, 4. Jan 06, 14:36

That would be very welcome, rasdan. I'll let you know when I have a functioning Beta ready ;)


After some searching I realised where I read about semi-organic Paranid ship-hulls - It's in the sector-description of Paranid Prime.

Any other reference I got to Organic hulls was with the Boron, So now I think I'll make it be some sort of collaborative Paranid-Boron prototype technology.

What are the race relations like between the Paranid & Boron? I haven't seen it mentioned much...

Interestingly, I also found references to a publisher's claim on the game-box that Self-repairing ship hulls are in one of the games, but it never came about.
People were wondering where it is...
Well, it's here :P

Kvalyr
Posts: 330
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Wed, 4. Jan 06, 17:21

Project on-hold for a while...

Needed to reinstall X3 due to a recurring crash. I copied my scripts into a backup folder inside the x3 directory.
I wasn't expecting the uninstaller to completely remove the whole X3 directory including user-created folders, as it usually doesn't with other games.

Whole mod has been deleted. :roll:

I'll start work on it again if X3 works after the re-install.

User avatar
LV
Sith Lord
Posts: 6358
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by LV » Wed, 4. Jan 06, 18:28

a tip for any scripter.

on installing x3 and the patches immidiatly zip the scripts and t folders as backups so you can just delete the current folders and go back to as fresh start with a new save :)

Rasdan
Posts: 40
Joined: Sat, 19. Nov 05, 16:18
x3

Post by Rasdan » Wed, 4. Jan 06, 18:47

Sorry to hear that. I think the uninstaller got updated with 1.3.
It didn’t do that in 1.201 as far as I remember.

Btw I have a comment regarding the disadvantage list.
I think it would be better if it wasn’t more expensive to repair a ship with the big ship repair tech, than it would be at a shipyard.

Reason:
It still requires a TL or bigger ship. At least an investment of 17Mill
You still have to pay for an expensive repair tech, millions of credits.
You still have to resupply with teladianium plates.
If you have to do all this AND still pay more for a repairjob that in a shipyard, I fear that people will find it easier just to order the ship to a shipyard. Shipyards are not that far apart anyway.

A DIY job is always cheaper than a professional. Especially if you have tools worth 20 million credits to work with.

However I have no problem with increasing the repair time to compensate I think 10 mizuras is ok, it’s still only 1 mizura on SETA
Last edited by Rasdan on Wed, 4. Jan 06, 19:58, edited 2 times in total.

Kvalyr
Posts: 330
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Wed, 4. Jan 06, 19:09

a tip for any scripter.

on installing x3 and the patches immidiatly zip the scripts and t folders as backups so you can just delete the current folders and go back to as fresh start with a new save
I hadn't thought of that :P
I just copied my whole X3 folder this time. One for scripting & testing, one for playing.
The only difficulty is in seperating the saves.
Sorry to hear that. I think the uninstaller got updated with 1.3.
It didn’t do that in 1.201 as far as I remember.
Nope, I was running 1.3 :P




I agree what with you say Rasdan. Good points, again. ;)



I spent the last hour re-writing the main scripts, off to test a few things now. :D

Rasdan
Posts: 40
Joined: Sat, 19. Nov 05, 16:18
x3

Post by Rasdan » Wed, 4. Jan 06, 22:16

To Zurechial

I have been fooling around trying to find out what the cost of repair for the different ships should be.
(I’ll try to calculate the price for taladianium panels based on this later)
I think it would be easier if the price is based on ship type. Eg one for TS, one for M3 one for M4 and so on.
My suggestion to do this is by changing the number of panels it takes to repair 1% for each ship class.
Here is what I found out so far:

Repair price in shipyard for a 50% damaged Ship: Ships under 50% is unrepairable as you suggested.

M3 Mamba 789200
M3 Perseus 758850
M3 Nova 789200
M3 Barracuda 728500

M4 Mako 182800
M4 Pericles 129511
M4 Scorpion 154250
M4 Buster 199900

M5 Discovery 24450
M5 Jaguar 22050
M5 Pegasus 28700

TS Caiman 106000
TS Mercury 92750
TS Demeter 84000

The meaning with all this is to find the ideal price for Teladianium panels.
I’m sure you can figure this out yourself, but here’s my input.

Lets say for a moment that you decide the price for a 50% repair of a M3 ship should be 600000 credits in panel cost.
(Cheaper that shipyard but it would still take a long long time for the 20+ mill investment to repay itself).

Then 1% would cost 600000/50= 12000 credits.

If you then say that 1 Teladianium panel repairs 1% of a M3 then the price for the panel, when the player buys it, should be 12000 credits.

However this would be a problem if it costs the same number of panels for 1 % in a M5 ship, the repair cost would be 600000 for a M5 ship too.

So by finding the right price for panels and the right number of them for each ship type you can balance it.

If you want, I’ll try to figure this out and give you the numbers !

This is it for now I’ll continue if you think it's a good idea ?

Kvalyr
Posts: 330
Joined: Sun, 1. May 05, 15:56
x4

Post by Kvalyr » Thu, 5. Jan 06, 04:10

Impressive work, nice job :D

If teladianium panels are an already-existing ware in the game I won't be able to mess with their pricing, so it'll have to balanced by the number of panels it takes for a given ship.
Also, the repair doesn't have to be hull%/per unit-time -- I was just using % up til now for handiness sake. It can be any mathematical fraction of the hull per any unit time.


Scripts re-written, mod back on track. I'll post again tomorrow with more details.

Rasdan
Posts: 40
Joined: Sat, 19. Nov 05, 16:18
x3

Post by Rasdan » Thu, 5. Jan 06, 12:35

Zurechial wrote:
If teladianium panels are an already-existing ware in the game I won't be able to mess with their pricing, so it'll have to balanced by the number of panels it takes for a given ship.
Ok, I didn’t know that it wasn’t possible to change the price of teladianium panels.
Then the only way is to balanced by the number of panels as you said.

Can you tell me the price of teladianium panels? It probably faster than teaching me to script them in.
Zurechial wrote: the repair doesn't have to be hull%/per unit-time.
It can be any mathematical fraction of the hull per any unit time.
Yes, I was guessing that it could be anything.
I was thinking more along the lines of hull%/per unit-teladianium panels.
This way 1% fix for M5 would costs X number of panels and 1% fix for M3 would costs Y number panels. X and Y depends of the cost of panels, this is why the panel price is so important to me.
If it’s calculated this way, fixing a ship with 10% damage would be cheaper that a 40% fix of the same ship.
However this can of course be made in a number of ways.

In my opinion the time could be a fixed time, or whatever you want to do with it.
It doesn’t really matter to me as long as my ships are getting fixed.

This will be the best script ever created :P

acrh2
Posts: 731
Joined: Sun, 30. Nov 03, 08:51
x3

Post by acrh2 » Thu, 5. Jan 06, 15:24

Why do you good people even bother with self-repairing blah-blah?
Make it real: Repair Drones - you tell them to protect a ship and they repair it over time, shield or hull, or both.
C2Q 6700 @ 3.50 GHz, OCZ 2x2GB @ 400, EVGA Nforce 680 sli,
EVGA gtx 280 FTW , Mitsu DP 2070SB 22"
X-FI Fatal1ty, Klipsch 5.1 UIltra, Sennheiser HD555
2 x WD Raptor 74 + 2 x 150 GB Raid0, 850W + 430W PS

Post Reply

Return to “X³: Reunion - Scripts and Modding”