[SCRIPT] Military Base Response revamp v2.16 [2011-10-27]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Scoob
Posts: 11184
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Hmm, something odd is going on.

I applied the latest update & reloaded my game - sure enough now I get the "Defense" uplink showing while patrolling a Boron sector. My Prestege was only 70 despite lots of capital ship kills but maybe that's right. Anyway, all seemed ok.

I was defending the newly recaptured Ocean of Fantasy when, taking a quick peek, I saw that my uplink had switched OFF once more - very odd. I now also get numerous RED Boron ships appearing in various sectors - but not my current sector. There is no normal reason for this, all my ships have Boron as friend (checked) none of my ships have illegal cargo (checked) there have been NO accidental shots landed or anything as I've pretty much been on my own. My overall rep is still high and hasn't taken a hit, my Police License is still intact. I cannot think what's gone on here.

Any ideas? I'm going to be script killing any Boron ships that are incorrectly hostile to me as this isn't right.

Edit: Interestingly when I try to view the extended information on a ship (enable in script editor) to check the ships FF settings I get an instant freeze.

Edit2: Damn, I just entered my staging sector, Hila's Joy, where I have a carrier with loads of scavenged stuff on it and ALL Boron ships turned red on me and attacked. This was my "safe" sector there being a Military Outpost here with a large Fleet to keep my parked ships safe. My rank is still unchanged, FF settings are still all just fine - I'm at a loss as to why this has happened. Think I'll have to revert to an earlier save as this is some sort of bug for sure.

Edit3: Despite the huge fight going on between my ships, me and the Boron fleet (all MBR ships) my rep is NOT going down at all. I just com'd the Military outpost and got:

You have earned a

250nullnullnullnullnullnullnullnull....(two lines in total)
military prestige rating in service of us.

Edit4: I reverted to an earlier save, just after I'd upgraded to the latest version, and all appears well - no hostile Boron anywhere. I continued to play - I was in Ocean of Fantasy defending against an invading Xenon fleet - pretty much on my own. I just destroyed a Xenon K and got a rather odd message:

Boron: 70nullnull5555 (+55)

Rather than the usual, cleaner message so something is wrong here. It's DIRECTLY after getting this message that I start to see hostile Boron appear in numerous sectors when I have a nav sat.

Note: I cannot revert to the prior version of MBR to test as the plugin manager says that installation fails everytime I try. Even removing current version first sees this message.

Edit5: Ok, I managed to revert to the prior version of MBR (v2.12) - trying a few times eventually saw it work...go figure lol.

Anyway, I reloaded a save just prior to Killing the ship that gave the bugged message. This time I killed it as usual but I had my turbo on at the time so didn't see the message. Kept playing as the prior time I'd started seeing RED Boron all over the place moments after the kill. This time...nothing, all looking fine. I've continued to play for around 15-20 mins and no hostile Boron have appeared thus far. So, reverting to older version fixed it for me - may I suggest there's a possible bug in v2.13.


Cheers,

Scoob.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Wow, thanks a lot for the detailed report.

I noticed in my post above I forgot to put instructions for updating. All you need to do is open the config menu to create some variables, did you do that by any chance?

I have a feeling that the prestige gain modifier variable is still set to null in your game because you haven't opened the menu yet to create it. So when you kill some ships you get "notoriety = notoriety + null", which no doubt causes problems.

I'll fix the above post now, sorry about that.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
Scoob
Posts: 11184
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Hi,

No problem, I was in the zone lol.

Hmm, thought I'd done that. The first thing I usually do is hit Install/Update then go and have a look to see what new stuff there is :-) Did you mean I should set something manually? Possibly something just glitched with my update and the modifier got broke.

Oh btw: the odd thing I didn't mention was that not ALL ships gave the null rep increase message. testing back to back I killed a Q prior to the "bugged" K kill and the Q gave a correctly formatted message...

Cheers,

Scoob.
Prism
Posts: 43
Joined: Mon, 2. Nov 09, 07:29

Post by Prism »

Not sure if this has been reported or not, but I found a pretty large exploit with missile resupply. I can just select the most expensive missile and keep selling it to the station when it regenerates them.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Prism wrote:Not sure if this has been reported or not, but I found a pretty large exploit with missile resupply. I can just select the most expensive missile and keep selling it to the station when it regenerates them.
Yeah I considered this, but then I figured you can have as much money as you want, but you got nothing really to spend it on if you're allied with Xenon.

Hmm, suppose it does mean you can buy infinite ships from Xenon shipyards, didn't think of that. I'll either have to remove the resupply feature, or make it so you can't buy any Xenon ships from their yards. Opinions?
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra »

add all missiles to the ware list at the xenon base.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Catra wrote:add all missiles to the ware list at the xenon base.
That's a partial solution, but it doesn't stop you from buying a ship, loading it with expensive missiles, then selling it again. Not sure if that would work as an exploit, but probably.

There is a way to be signaled whenever a purchase/sale is made, I will have to research further into this.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

I was wandering if the new update of this mod could actually create some kind of race cash propriety. I tryed to modify the Improve Race mod to do this but since it was my first scripting experience it did not worked. Im still trying to do this but since there is more experienced scripter out there... why not ask.

Could anyone make race responses more realistic in a way that they would actually earn money by controling sectors and owning stations.

For example, each sector give 5M credit to the sector owner (or relative to population within the sector) and each station in this sector give the sector owner an additionnal 1M. Each station owner get an additionnal 1M.

And then, make sure each race use that money to build ships/fleets.

That way, a race could be weaken and some could get the upper hand on other races and even conquer all sectors. You could also put a std race credit earned per hour and add the sector and station tax to it to determine its income.

ex: race = Teladi
race income = 100M
sectors income = 135M
stations income = 118M

so the teladi would earn 353M per hour and could created ships/fleets from that pool of money to defend/assault/retake sectors.

thank you
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Yeah I would like to do something like this, but getting it balanced right would take a looong time.

Plus, as you mention, it would quickly unbalance the race militaries and lead to one race taking over, making any long-term game impossible.

I might try to add something like this as an option, though.

If you're interested in experimenting, plugin.mbase.shortfall is where tokens are added and ships are spawned. You can try to modify the amount or the frequency tokens are given based on some more intelligent method.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
Prism
Posts: 43
Joined: Mon, 2. Nov 09, 07:29

Post by Prism »

ThisIsHarsh wrote: I'll either have to remove the resupply feature, or make it so you can't buy any Xenon ships from their yards. Opinions?
Can you add something to the base comm that allows you to trade in prestige points for ships? If so, could you have the purchased ships spawn inside the station?
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

ThisIsHarsh wrote:Plus, as you mention, it would quickly unbalance the race militaries and lead to one race taking over, making any long-term game impossible.
Maybe by adding a script that can change races relations toward the strongest race would solve this problem.

Like adding sectors values while calculating incomes and then if a race got like 40% of the universe map value all races would declare war on it.

Also, I ve written a post in '[Requests] Script Requests & Conversions'
that I ll copy here

'Could someone make a script that use a station whose only purpose would be to define who s the owner of the sector? Like a fort station or something like that.

Should have a lot of shield and hull power and maybe some guns on it.
Something like the orbital platform designs.
Also, only one could be built in a sector, and it should be build within a specific zone where no other stations could be built.

To gain the sector, a race would have first to destroy the fort and then build one before another one does. '

That would require a 'no owner' value but could bring some more interest to the game.

I know Im asking much... Should you be able to make those mods.... I would be very happy :P

Thank you
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

IR has just had a tax system added so you collect tax from stations within sectors. I would assume that the AI does this too (please correct me if I'm wrong). Kinda fits the bill doesn't it?
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

@TrixX: nah, what he's talking about is using taxes, or something similar, for the races to build ships.


@FriedTrix: at the moment the factions that are at war are defined by the player. I would like to add an automatic relation changing function (i.e. "diplomacy"), but it's another tough problem. If that were implemented, however, your idea to balance it by making races ally against the most powerful one is very good, I'll keep it in mind.

As for the sector takeover station thingy. In this plugin, sectors are taken by Generals piloting a M2 destroyer. I plan to add the ability for players to send their own M2s to conquer a sector. Soo, not exactly what you were asking, but some similarities.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra »

so in a very colorful display, the paranid showed how utterly incompetent they are by managing to friendlyfire(by ways of PSG and ramming) kill -7-of their own generals in a 15 second timeframe.

i lold.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

I ve juste created 4 script that work to calculate the money per station and sectors.

1-Initialisation of the races money
2-Sending a sectors array of all the sector on the map
3-Calculating the money earned for 8 races and player
4-Printing into the player log the money of each race(debugging)

Im just unsure how to insert these scripts into your stuff to make the right amount of M1, M2, M3, etc....

Any help? or you want me to send those scripts to you?

Thanks
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Well the easiest thing to do, rather than thinking in credits, think in terms of tokens. The amount of token 'cost' of each shiptype is in the spoiler tag in the OP. So you can use your script to modify the amount of tokens available to each race.

It may need some tweaking to plugin.mbase.shortfall to make it work, but not much. I think the code is fairly well commented for that script, if you want to take a look. Otherwise, I'll modify the script to make it easier to interface with and accept external token handling.

I can't look at it now, though, and it may be a few days before I can, lots of RL work to do (its 3am here and I'm still at the office).
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

I ve tryed to put the yaki and pirate as dynamic races like argon, boron and other. They dont seem to use their token nor they seems willing to invade. Im pretty sure I add the necessary var here and there on your scripts... got a clue why?

thank you
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

FriedTrix wrote:I ve tryed to put the yaki and pirate as dynamic races like argon, boron and other. They dont seem to use their token nor they seems willing to invade. Im pretty sure I add the necessary var here and there on your scripts... got a clue why?

thank you
Neither Yaki nor Pirates have military bases. These are necessary because the script commands "find nearest military outpost" and "is mililtary outpost" are used extensively. I plan to change this so that any station can act as a military outpost, just need to change the above commands to call a script instead.

They also don't have Recon scouts. Although they are not strictly necessary, they are the primary signal for invasions and defense (station attacks and destruction of big ships also call in reinforcements).

You can adapt the Xenon code to work with pirates, if you are daring enough. You will, at minimum, need to spawn a military outpost for the pirate/yaki race. The Xenon AL plugin script also spawns Relay scouts (same as Recon) and retasks all Xenon big ships to their nearest outpost.

You may want to enable debugging and check out log01002.txt in your savegame folder. You may have noticed there are debug messages everywhere, it really helps to see what's going on.


Having said all this, why not just use Pirate Guild or Yaki Armada, or Improved Races Yaki module?
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

ThisIsHarsh wrote:Having said all this, why not just use Pirate Guild or Yaki Armada, or Improved Races Yaki module?
Well for what I saw the pirate packs just upgrade the pirates and is still AS ALWAYS static universe to play in. I want something more realistic that if I decided to wage a war against the argon for example, it will change the outcome of the univers. That is what I wanted the money script to manage the output of ships/fleets from each races.

As for the improved race, it s the same thing. All race constantly build back things that, for some, can t afford. So yes the universe move a little but not there aint really a balance of power. Even if the argon would conquer (by chance) all the univers, all other race could still send as much retal and strike forces.

You scripts are better made for my purpose since you have the token thingy. The things I would try to get from improve race are the sector and station menus where you can see the money earned each hour, the possibility of giving a sector to a player if the conditions are the and his script that analyse what s missing to change the sector owner( you need to have at least one station... if you see where Im going.)

The fort thing is really something I would really like to get since it define clearly how to get the sector and what exactly to defend.

And I just craped my update by unistalling in the script manager
and reinstalling it to see if the mod I had made would take effect :( ...
Look like I ll do it again. At least my scritps are still there and I have a good idea of what to do.

Well, I ll try again to mod you script to enable the money mod and try to change your military outpost to many more station so all races will be able to create fleets till they really dont have anything left. :P

Im still interested in any future update of your scritps tho ;)
I ll probably also look closer to improved race script also...

thank you for helping me to try to get my mod going.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Yeah, player sector takeover is quite high on the todo list.

I am quite jealous of IR's menu system. Menus are just such a pain to create.

Like I say, the "fort" in MBR is a M2, check out the tkvr.create and job.tkvr scripts to see how they work.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”