Search found 45 matches

by Telos
Thu Jan 17, 2019 11:54 pm
Forum: Scripting & Balancing
Topic: How to add a variable to ships/parts?
Replies: 23
Views: 4412

Re: How to add a variable to ships/parts?

It feels inefficient and needlessly convoluted to create a separate special to keep track of a changing capacity for a (type of) ship part on a particular ship, when (types of) ship parts already do have capacities and max-capacities for each ship. We can already use NoDefaultCapacityEffect to overr...
by Telos
Thu Jan 17, 2019 6:37 pm
Forum: Scripting & Balancing
Topic: Can scripts access whether a ship has been damaged?
Replies: 11
Views: 1766

Re: Can scripts access whether a ship has been damaged?

Thanks folks for pointing out that a version of "split off damaged ships" functionality does exist. I had no idea that was there because it doesn't appear when all your ships are healthy, which is the main circumstance when I've used the right-click interface, mostly just to split apart troop ships ...
by Telos
Thu Jan 17, 2019 2:25 am
Forum: Scripting & Balancing
Topic: Can scripts access whether a ship has been damaged?
Replies: 11
Views: 1766

Re: Can scripts access whether a ship has been damaged?

Yeah, it would be a nice quality of life improvement to have the right-click menu that includes things like "Split fleet" also include an option to "Split off injured ships" (or perhaps multiple such options, with different percent-thresholds for what counts as "injured"). Since that would require C...
by Telos
Wed Jan 16, 2019 5:37 pm
Forum: Scripting & Balancing
Topic: How to add a variable to ships/parts?
Replies: 23
Views: 4412

Re: How to add a variable to ships/parts?

There is no such thing as a capacity of a part *on*this*ship*. The PartCapacity belongs to the parts design not to the ship. Well, it certainly *seems* like there is such a thing as a capacity for a part (or at least a part-type) on a particular ship. E.g., if you look in the FOCS for Solar Concent...
by Telos
Wed Jan 16, 2019 2:15 am
Forum: Scripting & Balancing
Topic: How to add a variable to ships/parts?
Replies: 23
Views: 4412

Re: How to add a variable to ships/parts?

Also note that there is a PartCapacity condition to query the capacity of a part "design" (note this value is not ship dependent) Yes, the non-ship-dependence is a problem I've been running into. I can (I think) change the capacity of a part I put on the ship, but I don't seem to be able to read th...
by Telos
Tue Jan 15, 2019 10:52 am
Forum: Programming
Topic: Species InterDesign Academy Research bugfix
Replies: 2
Views: 993

Species InterDesign Academy Research bugfix

The Species InterDesign Academy does not provide a noticeable research boost. I think the problem is that in line 94, its effect on research-focused planets is this: 94 SetResearch value = Value + 5 This has the effect of quickly ramping up the research meter to its maximum value (like force-energy ...
by Telos
Mon Jan 14, 2019 5:52 pm
Forum: Programming
Topic: TurnTechResearched not working the first turn
Replies: 14
Views: 2102

Re: TurnTechResearched not working the first turn

So, here's how I understand what's going on, sticking with the example where the player gets their own research-complete SitRep on Turn 20. On Turn 19, the research screen shows that I'm 1 turn away from finishing research on Active Radar. I click to end my turn. The game processes various events, i...
by Telos
Sun Jan 13, 2019 6:20 am
Forum: Scripting & Balancing
Topic: Can scripts detect which empires are AI-controlled?
Replies: 4
Views: 1257

Can scripts detect which empires are AI-controlled?

Can scripts detect which empires are AI-controlled? I know that many folks around here have been motivated by a design philosophy that is averse to letting the AI "cheat" in any way. An idealistic part of me shares that sentiment, but another part of me is much more pragmatic, and recognizes that ge...
by Telos
Sun Jan 13, 2019 5:58 am
Forum: Scripting & Balancing
Topic: Can scripts access whether a ship has been damaged?
Replies: 11
Views: 1766

Can scripts access whether a ship has been damaged?

In game, it would be helpful if the numerous SitReps reporting ship damaged in a battle could prominently display the *amount* of damage each ship received (or perhaps even better report its current structure / maximum structure), and not just that the ship had been damaged, as that would remove som...
by Telos
Sun Jan 13, 2019 1:47 am
Forum: Programming
Topic: TurnTechResearched not working the first turn
Replies: 14
Views: 2102

Re: TurnTechResearched not working the first turn

Ok, so I've now experimented quite a lot with this, and it turns out I wasn't entirely right, but I don't think the problem really has anything to do with TurnTechResearched nor OwnerHasTech. Instead, I think the problem is just that I can't find an opportunity to execute scripts between the time wh...
by Telos
Sat Jan 12, 2019 10:17 pm
Forum: Programming
Topic: TurnTechResearched not working the first turn
Replies: 14
Views: 2102

Re: TurnTechResearched not working the first turn

So I did indeed make one dumb mistake: putting the icon before the parameters in the SitRep generation call. Edited in the fix above so now it gets read in fine. Family duties demand my attention now, so will test it later.
by Telos
Sat Jan 12, 2019 8:49 pm
Forum: Scripting & Balancing
Topic: How to add a variable to ships/parts?
Replies: 23
Views: 4412

Re: How to add a variable to ships/parts?

Wow, I had no idea that ships even could have specials, nor that specials could have capacities. I don't think I've encountered either of those in-game. Is there an example of scripts doing this that I could look at? When specials have capacities, are their values preserved from turn to turn, or do ...
by Telos
Sat Jan 12, 2019 8:29 pm
Forum: Programming
Topic: TurnTechResearched not working the first turn
Replies: 14
Views: 2102

Re: TurnTechResearched not working the first turn

I'd like to get the SitRep as soon as I could otherwise know that they've researched the tech, i.e., the same turn that (if I paid attention) I could see that their detection circles got bigger, and the same turn that their detection level gets higher in the Empires data table. The way timing in the...
by Telos
Sat Jan 12, 2019 5:43 am
Forum: Programming
Topic: TurnTechResearched not working the first turn
Replies: 14
Views: 2102

Re: TurnTechResearched not working the first turn

Edit: Greyed out parts I no longer believe are true. Suppose it is currently turn 20. My opponent just got a sit-rep telling them that Active Radar has been researched. I can see on my screen that their detection circle got larger, and I can look in the Empire statistics table and see that their det...
by Telos
Sat Jan 12, 2019 2:46 am
Forum: Scripting & Balancing
Topic: How to add a variable to ships/parts?
Replies: 23
Views: 4412

How to add a variable to ships/parts?

I've been fiddling around with trying to script some of the organic ship changes I'd suggested in this old thread: https://freeorion.org/forum/viewtopic.php?t=10369&p=87512 Currently, a ship's max structure is recalculated each turn from scratch, starting with hull structure, adding on effects of ar...