[AL] [18.04.2011] Operating Costs [3.1.4]

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

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

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Fri, 18. Jun 10, 11:07

OK, got around that issue by reloading, filling up station with credits, and restarting your script. Not sure why it did that. But despite having fifteen million credits in some of these trading stations (that do nothing but secure a sector), they deactivate, and decompose, on their own.

My PHQ also deactivated, despite having 100 million credits.

Also, with over sixty products in my PHQ, the cost is going to be prohibitive. I understand your rationale though.

Awesome idea. It's acting funny at times.

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Fri, 18. Jun 10, 11:33

shields are sometimes problematic.
docks have 2gj shields, factorys 1gj shields.
if scripts dont get this right the shielding will definetly act strange.
and if more than 1 scripts is interacting with the shielding of stations it will get complicated.
so if you can tell me anything about your trading stations wich act funny i can probably defeat this problem.

player headquater get deactivatet automaticly even with 100.000.000 credits in it?
60 wares means costs of 30500 credits each hour. 100 million should be sufficient :?

player headquarter is some problem at my end: i never had one in TC so far so i cannot test this script on it - and scriptet headquartes doesn't work correct :-S

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Fri, 18. Jun 10, 19:36

Using this: http://forum.egosoft.com/viewtopic.php?t=252398 to maintain funds in stations. Five million each. Not sure if this is the reason why some trading stations "run out of money" in the eyes of your script. I will try managing it without script for a while and see what happens.

Hull degradation works fine.

I think your operation costs are good. Repair costs may be too low.

Overall, this is great. Adds much needed realism to stations. But this shield problem has to be investigated. I think it might have to do with that Station manager script; I'll play with it

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Fri, 18. Jun 10, 22:30

I think repair costs are fine.
To repair 100% of station the needed funds are equal to buy a new one.

Regarding shield problems.
while at work i thought about it. The only think i can think about is that one of other scripts you are using are interacting with station shields to.
and in this case it has to be broken.
Station shields don't have regular shield bays. each script has to store what they do with the shields. so 2 scripts working in different ways with the shields can not work.
All i can do alone is to prevent shields to fall to deep.

So i thought of an other solution:
In t-file there will be a switch to turn shild deaktivating on or off.
In case of shield problems you can set it to any other value and the stations won't loose the shields, but loose hull from the first hour. Thats the best i can do so far.

Today i will address in this way other problems to (big komplexes cheaper - more expensive: wehat now??)

The problem with the funds i cannot recreate too. im taking the funds direktly from station account. Maybe its the mentioned script. Don'T know what it does.

so i'll be back later with update.

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Sat, 19. Jun 10, 02:26

Update

19.06.2010 – 2.0

- end of beta
no bugs are found except the shield bug from russbo. and this one apperas to be script collision.

- increased costs for complex hubs and docks
ife calculated a bit. now each ware and station costs 1000 credits
You need to deactivate and reaktivate the plugin if you want to use this new value, otherwise your complexes and docks still calculate with 500 credits as base price.

+ added calculation for big complexes
big complexes now doubles the needed cash.
this you can adjust in tfile. (even turn around)

+ added reame (german and english)
nothing to say about this

+ switch to prevent shield bug build in (scriptcollision)
i'Ve found no other way than this one to prevent stations to be without shields.
stations don't have regular shield bays, you can even install 1.000 2gj shields in each factory. - or even -200 2 gj shields.

@Nafensoriel
if you want that complexes with more than 10 stations need less cash to run you need to set some values in t-file

<t id="40">10</t> <- for 10 stations
<t id="41">9</t>
<t id="42">10</t> <- with these two values you decrease the needed costs by 10%

10 stations costs normal 10.000 credits. with this values
10.000*9/10= 9.000 credits.

@russbo

to prevent your trading stations stranding without shields you should change the t id 75 to
<t id="75">1</t>

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Sat, 19. Jun 10, 06:31

Well, so much for discussing the previous version, you have a new one out.

Anyway, I've run the previous version for about twelve hours now without the Station Management program. it works as advertised, not an issue. Only one station, a Trading Station, which for some reason had shields go to -270000 (but 100%, ??) The other one hundred eight nine stations performed flawlessly.

Not sure why that one Trading Station did that....

As far as Trading Stations go, that are used for Sector Takeover control of new sectors, they don't seem to burn up any credits. They have no products... So using them is not a problem. Don't have to stay on top of them money wise, which I thought I would have to do (thus the Station Management script.

Will play with this new version tonight. We appreciate the updates. It's a very nice script. Surprised it was not part of the initial Egosoft offering.

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Sat, 19. Jun 10, 10:13

OK, you snuck something in on us. The need for energy cells in the stations, otherwise they deactivate and fall apart.

Well, great idea. But, for those of us who use Trading stations for sector takeover, now we have to add energy cells as a product in each station? How many energy cells need to be in the stations before they deactivate?

Is there anything else that a station needs (credits, energy cells) to prevent it from spontaneously deactivating??

It's getting to be more and more realistic. But, a little more work...

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Sat, 19. Jun 10, 13:25

They need energy cells?
There are absolutely no pont in code where they need something like that.
Docks get paid by wares count and station. if they don't have any wares they need at least to get paid for station, so 1000 credits each hour.

i've tested it on a trading stations without wares and it went down 1000 credits each hour.
added any ware and needed cash was 2000.

why do you think energy cells were needed?

edit: I got an idea wich may be possible:
I'm using a local variable to indicate active or inactive stations wich is originaly from comercial agent. I'm using this to see active or inactive stations within the global control from it. - and even to activate or deactivate it from comercial agent menu.
Maybe the comercial agents sets your station inactive as long as you don't have any wares listet? that may be possible.
Do you have installed commercial agent from lucike?
If yes then i think you only need to list any ware, but don't have to hold a stock. My script dosen't consume any wares. And i wont change it: A trading station withoiut wares isn't used! :)
It would be a nice surprise and be welcome.
(i would it only ad to readme/first thread)


The problem with the shields i can explain.
when station gets deaktivatet it runs for an hour.
then it checks if shields are above 0 - if yes it takes the amount of shields it had when plugin was startet - tradings stations have original 15 2gj shields. Then restart the waiting circle.
after the next hour it checks again if shields are there. if no shields then it decreases the hull and start again, if shields it take the shields and restart circle.

if now within the hour any other script installes shields my script is taking away each time 15 2gj shields.
But that means i case of stations it takes 30.000.000 shielding away.
so if another script installs a different amount of shielding each hour we've createt the bug you have encountered.
maybe we end up with -60 installed 2gj shields!?

and at last: each time you are taking away shields, the remaining shields went up to 100% - even if 100% is 0 or below.
so if you have 0 or below shields you will have always 100% shields , but no blue bar.

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Sat, 19. Jun 10, 19:47

I had a station that deactivated itself. It had plenty of credits, over five million. When I discovered it, the hull was down by fifty percent and there were no shields.

I tried to "repair" it with Station Management, and I got a message which said I could not repair it because there was no energy.

OK. Realistic. But, I was baffled as to what to do... LOL.

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Sat, 19. Jun 10, 22:36

cannot repair cause of no energy: look at the whole message

This station is currently out of service and doesn’t has any energy.\nYou cannot repair the station under this conditions.

Energy is story, the important part is that the station is our of service - deaktivated.
first you need to reaktivate the station. then you can start repairs.

Was the station a dock without wares? I asked Lucike but haven't got a response up to know. I think the CAG deaktivates stations without wares.
And this script talks with CAG ;)

As soon as i get a response about this i will look or change the readme/first topic.

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Sat, 19. Jun 10, 22:40

Yes, it is a dock without wares (except for rudder tunings, cargo bay, speed, standard Trading Dock stuff). Seems like those are the only stations that deactivate on their own.

I'll try adding some wares to these stations and then see if they deactivate spontaneously.

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Sat, 19. Jun 10, 22:56

rudder tunings, cargobay and this stuff aren't tradeable wares, so my script doesn't calculate them for running costs.
Normaly noone should be able to have them in there trading docks, so i didn't add them. maybe even lucike did not, cause you cannot trade with them - and CAG is trading script ;)

Ok, i'm looking forward to your report :)

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Sun, 20. Jun 10, 19:25

Huefte, over twenty hours of testing, no issues.

The only station that degraded, I think was fault. I placed it, and did not put credits into it in time (was doing other things). I think it had deactivated before I put money into it, and just started degrading as per your script.

Does not appear to be necessary to put goods into sector capturing Trading Stations.

Great script. Any thought of putting some sort of image into the Stations area so that you can see what is active and what is deactivated, before they start degrading?

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Sun, 20. Jun 10, 19:40

I don't know if its possible to put annywhere images in - i think it's not possible.

Where do you mean exactly? in Property owned-menu?

Bevor a station starts to decompose it's shields will fail - as long as you don't use the switch in t-file.
If you forgett to put money in it should send you a message and you have 5 minutes to transfer money.
If your busy right now you can read within the message wich station and look in station management if its deactivatet an reactivate if neccessary.
you have at least 1 hour until station shields will fail and another until hull degrading.

After decomposing starts you won't get messages: from who? they left :)
station management shows you activ or deactiv stations.
I'm checking my komplexes every day to search deactivatet stations within komplexes this way. Single stations you can see directly in property owned menu cause of missing shields.

it takes minimum 4,5 days for a station to decompose completely.

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Mon, 21. Jun 10, 03:45

Yes, understand.

What I'm suggesting, is some sort of menu or message that you can trigger, to see the status of your stations, workers, status of repairs, activated or deactivated, etc... Instead of waiting to see shields down, or hulls falling apart.

I have almost two hundred stations, which is not much compared to what some of the others here must have. Going into the Station Management order for each, to see if their active or deactivated, is just not viable. Collating the data into a message that you can bring up would be nice. It's a great script, just thought having some more interaction with it would be helpful.

Just a thought.

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Mon, 21. Jun 10, 07:52

ok, i understand - and allready ready *gg*

update

21.06.2010 – 2.0.1
+ added sector and universe to station management

First two entrys are now Universe and Sector.
If you choose sector all stations within sector will get listet with actual station on top - this may take some extra time
If you choose Universe all of your stations will get listed - on top the actual station. This WILL take some extra time, so be patient.
I have around 300 stations and it took around 10 seconds for me!

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Mon, 21. Jun 10, 08:56

Do you have the previous version of this script?

Upgrading with this latest one seems to cause CTD. Maybe... Will have to play with it, but I need the earlier version.

EDIT: Took Operating Costs scripts out of directories. Still cannot load any save game. I don't think my universe liked this upgrade for some reason.

Should be able to get back in if I have the previous scripts.

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Mon, 21. Jun 10, 17:00

ok, no problem. i uploaded it again for you.

http://www.c-hake.de/webstuff/OperatingCosts_2.0.zip

When did it cause a ctd?
While asking for Universe list or on starting/loading game?


update

21.06.2010 - 2.0.2
sector listed ki-stations - repaired

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Tue, 22. Jun 10, 03:22

2.02 seems to work fine. I think I narrowed down the cause of CTD (upon loading game).

It only seems to crash after I add an LI SSDN CCC station from Logain Abler's Security Defense script. Not sure if it's that script, or, that script interacting with yours. Adding that station, even with 2.02 causes CTD.

User avatar
Cadvan
Posts: 2940
Joined: Sun, 14. Mar 04, 05:05
x4

Post by Cadvan » Tue, 22. Jun 10, 06:34

Ok, here i have ?? in my eyes.
during loading game all my scripts do are building all stations, geting there production factor and then kill them again. -> creating an array of production factors for each station.

At present i'm thinking about some work on station management.
adding departements:
management: sector and station -> lists as they are at moment
statistik: sector and station -> what have you paid up to know for each station
assistant: global and sector -> get stations with status active, inactiv or repair

but for this it will have to rework the station management, t-files andcreate some of my own libarys. so it may take some time

better suggestions for names?

Post Reply

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