Modding & Scripting Requests!, This Includes Requests For Mods If They Have No Forum

The place to discuss scripting and game modifications for X²: The Threat.

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

What Would You Like To See In X2 Mods?

Combat Overhaul: New Combat Ships, Weapons, Shields?
5
14%
Economy Overhaul: New Trade Ships, New Wares, New Factories?
2
6%
Realism Overhaul: More Ships In Sectors, Race Wars?
7
20%
Ship Overhaul: Variety Of More Ships? Specific Job Related Ships?
6
17%
Graphic Overhaul: New Graphics, Different Sectors, Different Universe?
6
17%
Mission Overhual: New Missions, More Guilds, More Events?
4
11%
Faction Overhaul: New Factions, New Factions With Storylines, New Organisations?
3
9%
Difficulty Overhaul: Stronger Enemies, Weaker Enemies?
2
6%
 
Total votes: 35

Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

You're right that ships will need to be renamed after they're destroyed. That occurred to me when I was away. I'm not sure how it would be fixed. Where do ships spawn??? I remember watching a statiohn that had had its ships destroyed because of a khaaak cluster. I looked at its owned ships and saw that it had purchased some combat ships (m3/m4/m5). These were maybe 6-7 sectors distant. What were they doing out there? Shouldn't they be docked?? I was thinking one could setup a script on all of the shipyard to check for docked ships that have the wrong name.... this is assuming that the spawned ships appear at the shipyard.

Could the ships be renamed in one of the vanilla scripts? Do the non-player traders use any of them? If so, one could change the egosoft scripts to check for the ship name and change it if needed. In fact, this makes me curious what the egosoft scripts actually do. I know that just by bringing up the debugger... there're thousands of scripts running.

The initial reason I wanted to rename all of the ships and stations was to create enterprises. Enterprises are like businesses.... but in actuality they're like the player. They each own dozen(s) of stations in the universe. The idea is to connect the ships and stations with their owners in some kind of personalized way. And another goal was to define these other enterprises in terms that the player can understand - by reprepsenting them with total assets. This might help to give the player a goal. For me, it's about being able to compare myself to something else. If I could see what other stations are doing and how much money they have, it would help me to understand how well I'm doing. The BBS has an article about the top most wealthy people, and this is what I'm really trying to get at. I'd like that to be reflected in actual play, not just in a "virtual" article that has no real in-game presence. And that's the real intent for creating enterprises... for making this post... in a very basic form have them serve as competition with the player.

Beyond just renaming the ships and stations you might have to code the enterprises and code the asset assessments. The asset assessment script(s) are important because without them you couldn't compare yourself to the other enterprises. And the enterprises themselves should make choices... perhaps even compete with one another by buying eachothers stations. The initial asset conditions would be set when the universe is renamed... that's where the enterprises would be created and assigned their assets. So what this idea really was was the same idea I've had for a long time - how to introduce intimate competition that the player can relate to. I know that someone in the german forum, or one of the non-english speaking forums, is making a mod that introduces competition. I think I saw you say this somewhere. Can you sum up what they're working on?

It's true that the player is one of the most powerful forces in x2. That's the justification for having other races or factions pay attention to the player and to plot against him or her as a means of self-preservation - especially if they're an enemy. You can't have the player tearing up xenon sectors or any sector they want without some kind of response. Once a player has reached that kind of wealth, they're already richer and smarter than anything else in x2.
Hello there!! (Jumping up and down)
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

It's mmbecker from the german forum who works on a similar thing. What he's after is "player competitors". They act very much like the player itself. AFAIK, they start out with a TS, and trade to get more money. The competitor will buy stations if he made enough money and try to build a enterprise consisting of many factories. I know he plans much more, including some "attacks" on the player if he poses a commercial thread... But this is work in progress, and he has not "officially" announced any details.

I don't know where the ships will respawn. Your best bet would probably be to loop over the whole universe and look for ships not properly named....

I don't think using any of the ES script can be used to rename those ships, unless you only want to rename specific ships. They can be used though: I got tired of those ships all having the same name - Argon Mercury, no matter what their homebase is or what they're doing. So I change almost every command in the global script map for Pandora. The new commands change the ship names according to what they are doing. A freighter on it's trade run to buy or sell Energy Cells is now named "Argon Mercury Energy Transport" and thos ships scanning the player ships "Argon Discoverer Police" for example.
--------------------------------

[ external image ]
Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

So your script renames the traders?? Which ES script do you override to do that?

What is hte best way to alter an original ES script and have it work? I've tried in the past, but I always end up having to rewrite it from scratch, if my memory serves me, because after unpacking it the script editor doesn't see it - which means I can't change it.

Two potential scripts are "!ship.signal.killed.pck" or "!ship.rebuild.action.pck".

I'm not seriously considering doing this, but it's a thought experiment. I want to know whether it can be done. Is that other guy making sure that there's an english version of hte *.t file he's using? Is he making sure that english-only players will be able to use his mod? While I can change a german *.t file with a translation program... it's not like the original language and it'd take some time to translate each entry.
Hello there!! (Jumping up and down)
Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

I have another idea... when you make ship mods... try not to have too many small weak swarm ships or carriers like the khaak clusters (they're sort of like carriers in that they have lots of small ships erupt out of them) or m1. It seems to slow my system down when there's a bunch of small ships like that. I think it might be better to reduce the number of ships and keep them powerful so that the game engine doesn't have to plot the trajectories of too much weapon fire or run the scripts for the dozens of ships.

Does anyone know how x2 handles the thousands of trade ships in the universe? Is it actively plotting their course or is it estimated? I have to wonder how it processes all of it. There must be thousands of ships.
Hello there!! (Jumping up and down)
Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

Despite what chris gi said the other day, I've never seen any ship, outside of a mission, jump, that's not a khaak m3. Not only that, but I haven't ever seen a jumpdrive installed, either. I looked at the TLs, M2s and M3s in Argon space and I didn't see any with the jumpdrive installed.

So... here's my idea for a mod. Install jumpdrives on the TLs and give them scripts that allow them to jump. It must also retain the 3000 credits per gate toll that they charge. I'm not exactly sure how this would be done, but it's just an idea. Another one is to install jumpdrives on the M2s and M1s, but don't go any further than that. This mod could install on top of any other mod. Beyond that, it might be usefull to give some traders jumpdrives. Basically, replace random traders across the universe with new trade scripts that take advantage of the jumpdrive.

The mod would be an AL plugin and could be turned off in options. It's purely an environmental aesthetic - to see jumpdrives in action on non-player ships. It might make factory building faster because TLs will jump more often. If my experience is any indication, it should save a lot of time (i've built 43 stations - that's about 21.5 TLs that transported for me - and not one of them ever jumped). So it'd save time and make sense too.
Hello there!! (Jumping up and down)
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

So your script renames the traders?? Which ES script do you override to do that?
Not only the traders - all ships are renamed.
I have overriden all !ship.cmd.* scripts - now all (or almost all - I occasionally see some !ship.cmd.*-scripts and I haven't figured out where they come from) use my "ship.cmd*" scripts. These are just modifications of the original !ship.cmd.* scripts to handle the renaming.
What is hte best way to alter an original ES script and have it work?
As you sure already know, the script editor doesn't allow you to modify any scripts beginning with "!". So you have to rename the xml-file, for example from "!ship.cmd.attack.std.xml" to "ship.cmd.attack.std.xml". But if you look at the script with an internet browser, you see the name repeated in the heading section of the script: "Script !ship.cmd.attack.std". You next need to edit the script itself with a text editor (you need to do this outside of X2). You have to replace the two occurances of "!ship.cmd.attack.std" to match your file name "ship.cmd.attack.std". Save the edited file and it's ready for use in X2!
Is he making sure that english-only players will be able to use his mod?
I don't know. But he is aware that there's some interest in this script (in fact it seems there's more interest here in the english forum than there is in the german forum).

Does anyone know how x2 handles the thousands of trade ships in the universe? Is it actively plotting their course or is it estimated? I have to wonder how it processes all of it. There must be thousands of ships.
I'm not quite sure how it is all handled. But there is a fundamental difference between in-sector and out-of-sector processing (based on the sector the player is in). I think the position of ships is still computed, but the steps between updates are changed. If you look at scripts, they use most time in deep level instructions like "move to sector". If you use such an instruction, you give control over the ship to the game engine. It's all handled by the game engine, and it does a pretty good job I think.
Not only that, but I haven't ever seen a jumpdrive installed, either.
Maybe the ship I saw jumping was scripted in by me. But I didn't use any special script. I just talked to the captain to fly to the ship warf....
That may indicate that adding jumpdrives to ships may be enough to make them occasionally use it....
--------------------------------

[ external image ]
Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

Chris Gi wrote:As you sure already know, the script editor doesn't allow you to modify any scripts beginning with "!". So you have to rename the xml-file, for example from "!ship.cmd.attack.std.xml" to "ship.cmd.attack.std.xml". But if you look at the script with an internet browser, you see the name repeated in the heading section of the script: "Script !ship.cmd.attack.std". You next need to edit the script itself with a text editor (you need to do this outside of X2). You have to replace the two occurances of "!ship.cmd.attack.std" to match your file name "ship.cmd.attack.std". Save the edited file and it's ready for use in X2!
Thanks bro, a lot. I got it wrong b4 because I only changed one instance of the filename in hte script... so the editor couldn't see it.
Chris Gi wrote:Maybe the ship I saw jumping was scripted in by me. But I didn't use any special script. I just talked to the captain to fly to the ship warf....
That may indicate that adding jumpdrives to ships may be enough to make them occasionally use it....
Don't know. I'd have to take a look at the TL again and see if there's a jump instruction you can give to the captain, but I don't think there is. I'm absolutely sure that there's no jumpdrive installed. It sucks balls that you have to use a TS to install a jumpdrive in a TL... TLs can't dock at the goner temple. The reason I don't like that's because it ruined my original plan... I wanted to come up with the excuse that jumpdrives were too big and required too much baseload energy to be used by anything less than a TL. However, the excuse could still work because a TS can fit a lot of garbage in its cargo hold, and it's compressed with some kind of sub space compression technology. Without that technology, it wouldn't fit on the TS. However, it can be installed on a TS... immersion is lost. It would all make a lot more sense, to me, if the jumpdrive was XL rather than M, and it couldn't be installed on the TS. One way of doing it's to have a service provided where the jumpdrive is installed on the big ship by a third-party... so you don't have to put it on a TS. It could be removed from the goner temple... and an article posted in the BBS that a flaw has been found in the jumpdrive and that it has had to be returned and dismantled. Their solution is to make the drive bigger and a higher energy consumer. Thus, it'll only install on a big ship. Or you could sell the jumpdrive as a product rather than an upgrade... and add a ship command that installs the jumpdrive to a big ship. Blah blah blah blah.

Course', it's just a stupid jumpdrive and... ultimately, unless there's an easy solution, something like this will never happen. You won't see me do it, not likely anyway!
Hello there!! (Jumping up and down)
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

Well, the Pandora team did make similar considerations, and we still haven't come up with a final solution. We decided to make the jumpdrive XL cargo type and to remove from the Goner temple, so it's pretty hard to get one. It's not banned from the game, but we try to limit it's use to big ships (M0, M1, M2 and TL) - and of course we provide an alternative to faster travel between far away sectors.
The most dfficult part is to find a useful way in using it on the AI. If the AI can use jump drives on big ships, it's very easy to attack Pirate stations in a well hidden Pirate sector. To defend an empire against an attacker who can reach any gate is near to impossible!

And to answer your question you posted in this other thread (where it is off-topic):
Whne should init be used? I've stayed away from init becaus I think I read that it's only run once... when you start a new game.
I've read the same, but I don't believe it's true. I think they are run everytime you start a new game or load a save game. But init-scripts are run at first. Thus, when dealing with init-scripts you shouldn't access certain objects. For example, it seems that [PLAYERSHIP] is undefined at that moment. So you should only use a limited set of instructions.
I try to avoid them, too, because I only know of few things that needs to be made in init scripts: to laod texts for custom BBS messages (or so I've heard), and of course scripts that define the start conditions for custom maps.
--------------------------------

[ external image ]
Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

Chris Gi wrote:Well, the Pandora team did make similar considerations, and we still haven't come up with a final solution. We decided to make the jumpdrive XL cargo type and to remove from the Goner temple, so it's pretty hard to get one. It's not banned from the game, but we try to limit it's use to big ships (M0, M1, M2 and TL) - and of course we provide an alternative to faster travel between far away sectors.
The most dfficult part is to find a useful way in using it on the AI. If the AI can use jump drives on big ships, it's very easy to attack Pirate stations in a well hidden Pirate sector. To defend an empire against an attacker who can reach any gate is near to impossible!
Ya, jumpdrives do remove some of the strategic choices. For example, what is the purpose of armour if a bullet could warp through it without losing any momentum and then puncture your skin and blast you apart? Armour is a spatial strategy. Defensive sectors surrounding critical ship-building sectors are also like armour - without jumpdrives you'd have them to possibly contend with. With jumpdrives, you can skip the outer sectors.

This rule may apply on a sector to sector scope, but it doesn't for space inside a sector because a ship can't jump from one point to another inside a sector. Spatial rules do apply on scales smaller than a sector. That's why we have defensive ships and lasertowers and shields and hulls and so on.

Ultimately, if you removed space, there'd be no real defense against anything. Even shields and hulls could be jumped through... imagine a jumpgun... could get a hull breach immediately and destroy the ship with one shot. Or you could snipe the crew members one by one, lol. They'd have no defense.

So the real means of defense and strategy is on the scale of a single sector - especially the most important ones. So this means that outer defensive sectors are pointless. Instead, you've got to fill your most important sectors with every imaginable defensive measure available.. ample amounts of lasertowers and ships. Unfortunately, this does remove the strategy of sector-scope positioning. It also means that you'll be battling jump-capable ships in the sectors they do business in... rather than battling them in isolated, defensless sectors. This happens because the jumpers will jump past the isolated, defensless sectors... so they'll have the advantage. Pirates would have to focus on non-jumpers. Or they'd just have to organize, focus their forces, and engage them only in the weakest sectors. This also means that you could jump past enemy sectors to outpost sectors and get a big profit without worrying about evading or combating the hostile sectors. Wrapping my mind around this chemistry is difficult, I'm...

A universe where ships routinely jumped would probably change how everything works. Enemy ships would try to destroy the solar power plants first so ships wouldn't be able to fuel their jumpdrives - this would help prevent retaliation from that immediate sector. If you wanted to soften a sector.. you'd take out its solar power plants or you'd battle ships near them... this means ships couldn't depend as much on jump to escape enemies. And important sectors would move around more. I'm sure there's more... X2 is not a jump-enabled universe. Like you and I have discussed here, most ships don't jump. It's virtually a khaak and player-only feature, except for the missions where ships "jump" to the sector. If normal, non-mission ships did jump, it'd be interesting to see how it would change the dynamics of x2. I bet I'm only scratching the surface, and I might be getting all this totally wrong.

.......................

On the topic of big ships and jumpdrives...

Why not just replace the goner temple 3d station model with the shipyard model? Then you could allow TL/m2/m1 to dock at the goner temple. Other ships could too, but they couldn't equip the jumpdrive unless they're a big ship. Then you don't need a 3rd-party to install it.

.......................

Btw, do you know what !ship.rebuild.action.pck does? And... if I made remade it as !ship.rebuild.action.xml, how would I ensure that the script engine would use it rather than !ship.rebuild.action.pck? Would I delete !ship.rebuild.action.pck? Or would I replace !ship.rebuild.action.pck with the custom version (after encrypting it so it's a *.pck file) I made?? Basically, I want to know how to customize the ES scripts and ensure that the script engine uses those rather than the originals.
Hello there!! (Jumping up and down)
Lord Dakier
Posts: 3258
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier »

Should make it so that the jumpdrives are only produced from one place and change the fuel for them so they require something which can only be mined from an asteroid as such. Perhaps 1 piece of Nividium along with so many E-cells.
Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

Lord_Dakier wrote:Should make it so that the jumpdrives are only produced from one place and change the fuel for them so they require something which can only be mined from an asteroid as such. Perhaps 1 piece of Nividium along with so many E-cells.
I think just limiting to big ships is enough... don't even need the energy cell expense, imho - that's just annoying. Besides, big ships can't dock at solar power plants. However, tying nvidium to jump drives is kind of a different idea. How about a smaller jumpdrive for small craft... but it requires nvidium or a product produced with nvidium as a primary? I don't know what the explanation would be. This way you could jump without flying a big ship... I prefer to stay in my m5. It would be expensive though... too expensive for all but the richest and most prolific - nvidium might only be found in xenon or khaak sectors. However, I don't really care whether or not something like this is ever done. Just having jumpdrives on big ships with a few other changes to make sure that only big ships have them and that there're some examples.. is enough for me.

I don't like to see inconsistencies in the game. I hate it that players get things that non-players don't. For me it ruins the immersion... the sense that I'm playing in a universe that makes sense to me. I'm not talking about it having the same rules as our universe has, I mean that the rules within the virtual world are balanced in relative terms... relative to the other elements in the virtual world. It doens't make sense that hte player would have these vast advantages over other elements in it.. not unless you make hte player a distinct entity.. something special and maybe legendary. Not just a plain ol' fancy pants argon! Perhaps one way of doing it would be by making the player a seperate mystery race.. and that you build up this race to compete with the others for domination. It would need to be some kind of excuse.... kind of like how in the new star trek IX they explain all of hte changes by simply stating that this phase of star trek is in an alternate dimension, and that some things will be different. In this way, people can't latch onto differences from other star trek films and complain about it, not without compromising their arguments.

Btw, I found one mod that gives big ships jumping ability (i don't think they're the original big ships, instead they al plugin ships). I'm going to use this mod along with a couple others in a new game.

Here's hte mod:
http://forum.egosoft.com/viewtopic.php?t=85639
Hello there!! (Jumping up and down)
Lord Dakier
Posts: 3258
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier »

RRP is fairly good. Have not been able to try it out properly yet though.

Well big ships such as M6's upwards really I think should need something rich to make them jump. Maybe 1 spacefly could be used to get you so far. Then it takes like 100 energy cells to match the energy of this spacefly. Smaller ships due to lack of size require that they add a Nividium crystal to their engines and maybe a boost extension.
Jonson27
Posts: 170
Joined: Thu, 3. Jun 04, 14:08
x2

Post by Jonson27 »

Lord_Dakier wrote:RRP is fairly good. Have not been able to try it out properly yet though.

Well big ships such as M6's upwards really I think should need something rich to make them jump. Maybe 1 spacefly could be used to get you so far. Then it takes like 100 energy cells to match the energy of this spacefly. Smaller ships due to lack of size require that they add a Nividium crystal to their engines and maybe a boost extension.
Seems ok, except need some plugin Artificial Life jump-capable trader scripts or mercenary scripts or whatever - there'd be a lot of pirates using spaceflies to jump and i don't think its illegal nature would disuade very many people - in fact it might have to become legal. My choice would be nvidium for both m6 and smaller ships because m6 are small versus big ships. One of my quams is that the jump drive is big AND requires a lot of baseload power - which is why it needs a TL or similar size ship... the TL has 1000+mw generator and is big too. The m6 isn't that big and has a < 1000mw generator... so i'd say... nvidium for anything smaller than a TL... an m5 would need a lot of it. It needs to be real expensive... or the nvidium needs to be hard to get... or you're going to have to script some AL jump-capable traders to explain the ease to acquire jump-capable travel.

At the end of the day, I'd be happy just to have an al-plugin that gives jump capability to small and big ships... then you could just keep the jumpdrive in its current state at the goner temple. The race response mod i linked above would cover m6 on up to big ships... but you'd need one for smaller ships too. All that would be needed, i think, is a background loop to periodically give traders (TS/TP) and fighters (m3/m4) jumpdrive upgrades.. then to somehow replace the ES travel scripts or whatever is used to move traders and fighters... replace them with jump-capable versions... and they'd also need to buy extra e-cells. Blah blah. I'm not sure how complicated it would be.... but.... I'd use it :)
Hello there!! (Jumping up and down)
Lord Dakier
Posts: 3258
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier »

Nividium is hard to get believe me lol.

Well lets say a Nividium crystal can be used to mass accelerate properties... linking it to a ships engines will create a jump capability.
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

I haven't been able to change the resource a jump drive needs or the amount of Energy Cell it uses. I think this is hardcoded.

As I mentioned before, the ship I saw jumping didn't run any special command. I just ordered the TL to go to a sector several sectors away - and it jumped. It seems that the script instruction "move to sector" itself does occasionally use an installed jump drive - no matter if there are enough EC on the ship available or not. I try to verify this.
Btw, do you know what !ship.rebuild.action.pck does?
Judging from the code, it does nothing special. It just moves to a certain sector and starts the default command for the ship. This indicates that respawned ships come from ship wharfs....
f I made remade it as !ship.rebuild.action.xml, how would I ensure that the script engine would use it rather than !ship.rebuild.action.pck?
AFAIK, pck-files have higher priority than xml files. So you either have to delete the pck-file, or repack your xml to override the originial file. That's what I did with !fight.attack.object. Now the repacked version is used instead of the original file....
--------------------------------

[ external image ]
Guest

Post by Guest »

im not requesting a mod only a basic explanation how to make a ship and put it into the x2 game.... and please if you can dont refer me to a link since most are filtered .....plllleeeeaaasseee
Lord Dakier
Posts: 3258
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier »

Im no good on the modding side but you could always wait for Chris Gi or Shadow Dream to either post here or pm one of them.
User avatar
Shadow dream
Posts: 1840
Joined: Thu, 1. Mar 07, 11:39
x3tc

Post by Shadow dream »

ähm, well the good tutorials are alread written :P
I'm a Link
actualy this is only one, but it was the easiest to find without searching :lol:

if you have further questions, PM me :)

Shadow
Wahre Gentlemen behalten sogar umzingelt von Löwen ihren Leitsatz: Ladies first.
Wann lernt die Gesellschaft endlich, dass Geld erst die Probleme macht, die wir haben?
[ external image ]
Topic - Gallery - Forum - Freiheit
Lord Dakier
Posts: 3258
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier »

Reckon anyone could get something like this in here? :P

http://www.youtube.com/watch?v=0_2WZ7RDqJ8
User avatar
Shadow dream
Posts: 1840
Joined: Thu, 1. Mar 07, 11:39
x3tc

Post by Shadow dream »

:lol: that thing would be cool!!! :D

hm, if I find such a model somewhere I'll use it as an astronaut :D

Shadow
Wahre Gentlemen behalten sogar umzingelt von Löwen ihren Leitsatz: Ladies first.
Wann lernt die Gesellschaft endlich, dass Geld erst die Probleme macht, die wir haben?
[ external image ]
Topic - Gallery - Forum - Freiheit

Return to “X²: The Threat - Scripts and Modding”