BETA release - StationWar Mod v0.5

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

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

mippy
Posts: 792
Joined: Tue, 27. Apr 04, 17:51
x3

Post by mippy » Wed, 1. Sep 04, 03:58

I don't know the programing bit, the best I can do is make comments and try to spark Ideas, as I already did once.
A proud Goner!

It's better to remain silent and be thought a fool, then to speak up and remove all doubt.

http://www.tildruin-mindseye.co.uk/innocent.html

Carl Sumner
Posts: 5145
Joined: Mon, 23. Feb 04, 01:28
x4

Post by Carl Sumner » Wed, 1. Sep 04, 04:54

This is the most interesting Mod I have seen yet. :)
sayfadeen wrote:Actually I think I just thought of a way to do it. Wouldn't need to go through all ships in a sector, just military ships, since freighters aren't going to be going around blowing people up. That might keep it from crashing. I'll give it a shot and keep interested parties posted.
I haven't worked with X2 yet, but here are some hints from other systems:

If a process is not time critical then do it a little at a time, with pauses to rest (and return the stack) in between. This should prevent infinite loop detection errors and such. It also will spread the CPU load out so that it is not so noticable.

Real people don't get the word sometimes, so a few Objects (ships) missed may not be a problem in a simulation. Run the script again later to get the new ships and any missed.

For simulations, don't forget to use the random number generator.

Functions that normally use floating point and power functions can often be implemented without them. The resolution is lower but might be enough for a game. Many functions can be done in binary/fixed point by using "scaleing" techiques. Shifting (multiplying/dividing) numbers to make sure they stay within the "number range" is a lot of work, but it can make a practical program that does the job. I have done an audio signal processor in 16 bit microcomputer registers.

Strategy scripts would not need to run fast, something in the "background" that completes about every hour would be realistic.

HTH. :)
Tinker

"If engineers built buildings the way programmers write programs, the first woodpecker that came along would destroy civilization!"

User avatar
Furthark
Posts: 317
Joined: Mon, 9. Feb 04, 18:12
x2

Post by Furthark » Wed, 1. Sep 04, 13:08

The Pirate Station has weapon-slots (4) thea are around the station on static points, but i don know if they can aktivat per script

mippy
Posts: 792
Joined: Tue, 27. Apr 04, 17:51
x3

Post by mippy » Wed, 1. Sep 04, 17:25

what about just changing all new ships foe status. and jsut make another script that you have to activate the first time you start that will only run once but go through all the ships in the galaxy cahnging all their status. so basically your mod and then an extra script that has to be run seperately that will set the universe up. I don't know how to desribe what I'm thinking any clearer right now sorry.
A proud Goner!

It's better to remain silent and be thought a fool, then to speak up and remove all doubt.

http://www.tildruin-mindseye.co.uk/innocent.html

sayfadeen
Posts: 28
Joined: Fri, 30. Jul 04, 00:19
x2

Post by sayfadeen » Wed, 1. Sep 04, 18:41

Done :) Much thanks, much thanks for the ideas and suggestions. This is why I released the beta, so I could get some help and suggestions from people. Per Carl and Mippy's suggestions, putting a little 50ms pause in the loops seems to have kept it from crashing. It will periodically (ever half-hour) re-loop and set any new ships.

New file is in the zip at the strike9 link (shiver). Click on the link, click on the .zip image thing in the middle, right click on the expanded image, save as.

Now for that station weapons idea... :)
Last edited by sayfadeen on Wed, 1. Sep 04, 19:09, edited 1 time in total.

sayfadeen
Posts: 28
Joined: Fri, 30. Jul 04, 00:19
x2

Post by sayfadeen » Wed, 1. Sep 04, 18:46

Oh, and another thing I forgot to include in the readme. NPC race station constructions will be recorded in your log-book (new capital ship constructions/purchases will be sent as a pop-up). Since station constructions are fairly frequent I didn't put it in a pop-up, as it would probably get irritating after awhile. But if people want, they can check what different races are up to by periodically checking the logbook.
Last edited by sayfadeen on Wed, 1. Sep 04, 20:36, edited 1 time in total.

sayfadeen
Posts: 28
Joined: Fri, 30. Jul 04, 00:19
x2

Post by sayfadeen » Wed, 1. Sep 04, 20:15

So any ideas about the military strategic race AI, so the races actually have to think about what they're doing and how they're going to do it? The problem, as mentioned before, is that my brain seems to be stuck and I can't think of too many "strategies" for the race's to employ in their war, other than just send as many ships into a sector as possible and try to blow up everybody there. The problem, for me, is the jumpdrives, meaning that a race doesn't have to worry about protecting high-value sectors (home sectors, etc.) by ensuring proper defenses in outlying sectors, attacking race's don't have to worry about what "route" to take to get to the enemy, etc., since they can just jump in wherever they want. Any ideas? And I do mean any, however big or small :)

brohawk
Posts: 63
Joined: Sat, 24. Apr 04, 23:04
x3

Post by brohawk » Wed, 1. Sep 04, 23:42

I think the simple solution would be to NOT let them use jumpdrives, that way you have some strategic elements of controlling sectors and protecting them at crossroads. Otherwise you would have huge fleets and that would just be messy. Yeah, the player would have an advantage but if they wanted a challenge, they wouldn't have to use it.

sayfadeen
Posts: 28
Joined: Fri, 30. Jul 04, 00:19
x2

Post by sayfadeen » Thu, 2. Sep 04, 00:09

Yep, that's exactly what I was thinking. I was thinking about disabling jumpdrives on ALL capital ships. Fighters, TSs, etc. can still jump around, but big ships wouldn't. Some pseudo-scientific reason could be concocted for realism, like capital ships are too big to create a jump field around with existing technology (but gates still work, because gates were made by some unknown race). Then the player would also have to plan as well, while still being able to run his or her factories with jumpdrive equipped ships and so forth. If he or she wants good OOS with his capital ships, he can't send them half-way across the galaxy and expect them to get back soon, etc.

Would really change the game. What do people think?

Mailo
Posts: 1901
Joined: Wed, 5. May 04, 01:10
x3

Post by Mailo » Thu, 2. Sep 04, 00:34

No idea if it would be possible, but how about forbidding capital ships to jump to enemy sectors? Lets say with some interference device that requires a correct frequency to allow a jump?

Which would naturally lead to a mission to steal said frequency for a sneak attack (one capital ship only, as the frequency would be changed rather fast after the first Oddy appears in Argon Prime :P )

Darkfire1
Posts: 128
Joined: Sun, 18. Jan 04, 15:05
x4

Post by Darkfire1 » Thu, 2. Sep 04, 01:40

Well one suggestion is my mod, i have done quite abit of work on a new map/mod that will allow the player to start a new game with my map. The reason i reccomend this idea is becuz it complety changes the base each race has to build on. With sayfadeen's AI economy modding and my limited map it should have a great effect on a real world basis and not have to worry about Jump gates and such.

One main thing i have started is a new "Highway" system creating a 5th gate at times to jump from sectors to others that are far away. Im still fine tuning the gameplay, but it comes down to races having only one sector per empire. I thought of creating one massive sector but the X2 engine will not support the demand.

Maybe this helps?
X3 TC Ship Index
Community Ship Pack Mod
X2 The Threat - X3 R - X Terran Conflict

Darkfire1
Posts: 128
Joined: Sun, 18. Jan 04, 15:05
x4

Post by Darkfire1 » Thu, 2. Sep 04, 01:42

PS. @ milao yes we could use the IFF ware to make this happen :)
X3 TC Ship Index
Community Ship Pack Mod
X2 The Threat - X3 R - X Terran Conflict

Pumpkin10
Posts: 1208
Joined: Tue, 23. Sep 03, 20:14
x3

Post by Pumpkin10 » Thu, 2. Sep 04, 01:55

Err, I just installed the Stationwar mod, and well..So far it's nothigng special.

It's a great Idea and everything, and it sounded really cool..But after I installed it, the only thing my game does is crash..

Darkfire1
Posts: 128
Joined: Sun, 18. Jan 04, 15:05
x4

Post by Darkfire1 » Thu, 2. Sep 04, 02:06

He is working on it and i will be hosting it soon :)
X3 TC Ship Index
Community Ship Pack Mod
X2 The Threat - X3 R - X Terran Conflict

brohawk
Posts: 63
Joined: Sat, 24. Apr 04, 23:04
x3

Post by brohawk » Thu, 2. Sep 04, 14:03

You could prevent m1/m2/m6 from jumping that would solve the issue. Let TLs jump for economic reasons. Using some technology that prevents enemys jumping in would suffice as well but would require extra coding to check friend or foe, but what about sneak attacks?

Personally, I don't jump around much so either would be fine. I think that simply explaining the reason for doing so is to increase strategic play between the races. Players could decide for themselves if the trade off is worth it. Maybe you could make it a switch so that they can either get strategic play without jumpdrives on their big hitters, or they can do without. It would probably be a separate script anyway.

sayfadeen
Posts: 28
Joined: Fri, 30. Jul 04, 00:19
x2

Post by sayfadeen » Thu, 2. Sep 04, 15:24

Pumpkin10 wrote:Err, I just installed the Stationwar mod, and well..So far it's nothigng special.

It's a great Idea and everything, and it sounded really cool..But after I installed it, the only thing my game does is crash..
I don't know why this is happening. I haven't had any crashes with mine, even leaving it on overnight with 10x seta on, and I've tried with numerous other mods and scripts installed, as well as on a fresh install with no other mods and scripts, and haven't had any crashes. But clearly something is wrong. *sigh*

Um, well until some modding master can tell me what's going on, all I can say is:

1) Make sure you're using 1.4

2) Unzip everything to the games directory, so the mod's scripts folder gos to X2s scripts folder, the mod's t folder goes to the x2 t folder, and the mod's "mods" folder goes to x2's "mods" folder.

3) Go to the select mod thingy in the opening screen before the game loads, select stationwar,

4) Load a saved game.

But I'm going to hazard a guess and assume the people who've had problems have done those steps. I obvioulsy want to fix this problem, and wouldn't have realeased the beta if I thought this was going to happen. But its difficult since the mod works fine on my machine, and I spent a long time playing it and running it to make sure that it didn't crash, so without being able to replicate the problem on my machine, it's a bit difficult for me to pin down the cause of the problem. Maybe some modding guru with freetime can take a look and tell me what's causing this. I'll try my best in the meantime.

Apologies.
Last edited by sayfadeen on Thu, 2. Sep 04, 16:28, edited 1 time in total.

jduato
Posts: 44
Joined: Thu, 3. Jun 04, 19:28
x3tc

Post by jduato » Fri, 3. Sep 04, 11:43

I tried the mod yesterday because I was a bit bored with the game and needed some goals. The plot in the readme sounds great. I wish I had more time to try everything. Anyway, here are some results that may be of interest to Sayfadeen:

My configuration is V1.4 on top of V1.2US, plus official signed scripts for Galaxy Trader and BPH (or BHP?) (do those scripts any difference with respect to crashing?), plus several unsigned mods.

1) After installing the mod, and WITHOUT selecting the mod (i.e. original game), saved games crash if they correspond to modified games.

2) After installing the mod, and WITHOUT selecting the mod (i.e. original game), saved games do NOT crash if they correspond to the original game.

3) After installing the mod, and selecting the mod, saved games do NOT crash regardless of whether they correspond to modified or original games.

Some bugs found:

1) If I start from a savegame of the original plot, just after selling the Express shields in Terracorp HQ, when I start travelling toward Black Hole Sun, I received 900 messages. Most (or all of them) seemed to be a repetition of three messages (a new Teladi M1/M2 in Seizewell, another one in Ianamus Zura, and another one in PTNI HQ). I visited two of those sectors and I did not see the 300 capital ships that should be there. So, I guess this is a bug. However, when I started from my last savegame (plot completed, 10 M2s, 50+ stations, 2 billions in the bank, etc) I did not receive the multiple messages. Well, I did not receive any message indicating the creation of M1/M2s. This bug is very annoying because I have to read all the messages before I could reach Ban Danna's message.

2) In the Special menu, the first item (general retreat or something like this) indicates ReadText and something else on the right. This is a very minor bug.

Now, two questions:

1) Did you design the missions so that they could be played from the start (i.e., after selling the Argon Express shields in Terracorp HQ)? Or will I need any of my capital ships to complete any of the missions in the plot?

2) Did you design the missions to be played after completing the original plot (thus having the coordinates of the Khaak sectors) or is your plot independent of the original plot?

Thanks for your great work

sayfadeen
Posts: 28
Joined: Fri, 30. Jul 04, 00:19
x2

Post by sayfadeen » Fri, 3. Sep 04, 15:54

Thank you very, very much for your detailed report.

The 900 messages thing is interesting. I had not tried to load a saved game from within the original plot; I tried it with post-plot saved games and, a fresh saved game from right at the beginning (as soon as you fly out of the Collosus). It is also odd that you got a number of messages about new capital ship construction. On the normal map, the races don't start with enough races to build capital ships. They should be building more power plants/ore mines/or sillicon mines and so forth (on the massive war mod map, however, they do start with enough resources and usually begin new capital ship constructions. Are you using the normal map?). New station constructions should be sent to your log book, and new capital ship constructions to a pop-up window. If you can check your log book on a post-plot saved game, within five minutes or so of starting there should be some notes in your logbook about new station constructions (and this should be why you didn't get any messages, because no new capital ships are supposed to be built at the beginning on the normal map).

In any case, it seems to have something to do with some kind of conflict with the original plot. One thing that was on my TODO list was to disable the plot in the mod, since it wouldn't make much sense anyways, given that on the one hand Ban Danna will be telling you to do missions for Argon Intelligence and on the other hand asking you to join his rebellion against the Argon :) It sounds like if the plot is disabled this bug shouldn't crop up, and it needs to be done anways (see below).

For the readtext, do you remember which menu command it was? I'll check the T files once again and make sure everything is there. But in my experience with testing the mod on my machine, ReadTexts pop up occasionally when first loading a saved game, and the solution is to go to the script editor and hit "Reinit script caches." I don't know why, but sometimes it seems to only load the xml t files half-way. Usually a reinit script caches will remove any read-text thingies. But just send me a PM or make a post as to which comamnd in the meni it was, and I'll check the T file and make sure everything is where it should be.

The missions are probably designed for someone starting off fairly at scratch, though they can of course be done at any level. But, like I said in the readme, the new missions are somewhat Wing Commanderish in the sense that you will (in most cases) be given what you need to do the job. (small spoiler) The first mission, for example, you will get a handful of Novas to do the job, and so forth. So one can do them from scratch, hop in your beginning Disco in Argon Prime and fly out to Black Hole Sun and start the missions, or one can start with one's own fleet. The last few missions are very difficult though, and one will probably need to have played enough to get a good fleet of capital ships. So to start, one doesn't really need anything, it will be provided for you; but to finish one is going to have to have a sizeable combat fleet.

As far as the missions and the original plot, well I designed the missions to all be a post-plot series of events. Hence the reason why I need to go in and disable the original plot in the mod, for consistencies sake. For the Khaak sectors, this is another thing I completely spaced out on, and I'll need to put a small script in to give the player knowledge of all the Khaak sectors if he doesn't have it already.

Keep me posted on any other problems you find.

Much thanks,
Sayfadeen
Last edited by sayfadeen on Fri, 3. Sep 04, 18:16, edited 2 times in total.

sayfadeen
Posts: 28
Joined: Fri, 30. Jul 04, 00:19
x2

Post by sayfadeen » Fri, 3. Sep 04, 16:06

Ok, think I found the read-text problem. That and the plot issue will be fixed in the v0.6 release, which should be out in the next couple of days on strike9. I'll keep everyone posted.

Exekutor
Posts: 1096
Joined: Mon, 22. Dec 03, 18:52
x2

Post by Exekutor » Fri, 3. Sep 04, 19:45

I tested your mod, but i cant finish the first mission. Danna tells me that i should kill 15 mercurys, but in OL only 6 Mercurys (and 6 novas) spawn, if i kill them nothing happens (even when i contact Danna). What should i do? i destroyed the shipyard, but still the mission isnt accomplished.

and a found a bug (i think it is one): when u talk the first time with Danna in Black Hole Sun, he gives u the mission and 4 novas, but everytime i contact him again (without making the mission) i get the same message again and another 4 novas :D it would be better if the player only gets one time the novas ;) (will the same happen with the Khaak M2 :fg: :D ).
Ich bin nicht nur gekommen um dich zu sehen.
Ich hatte etwas Radikaleres im Sinn.
Kill a man and you're a murderer. Kill many and you're a hero. Kill them all and you're a conqueror.

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