Overlords Playtest Thread - Testers Welcome!

Joined
Feb 11, 2012
Messages
831
Hi Tech,

I can only imagine that as Curt is creating a scenario that can be played as any of the 7 major powers that he can't cover every possible situation for every faction and therefore is trying to cover the most well know events. To attempt to cover all the possible situations and exceptions would be a very daunting task indeed.
 

CurtSibling

ENEMY ACE™
Joined
Aug 31, 2001
Messages
29,293
Location
Innsmouth
@civ2units suggested making the invasions only work when the AI research them. That is the way around the dilemma of trying to cover all bases. I can then make the AI resistance more deadly.
The tech rate can be tweaked too. I am confident the fine tuning can make the scenario more challenging for the player, and in the right ways. I appreciate your hard work and data, @tootall_2012 !
 
Joined
Feb 11, 2012
Messages
831
The tech rate can be tweaked too. I am confident the fine tuning can make the scenario more challenging for the player, and in the right ways. I appreciate your hard work and data, @tootall_2012 !

Your welcome.

As I wrote in a prior post, for certain, if Germany didn't receive as many free reinforcements when it captured certain cities in Russia, and elsewhere, the going would have been much tougher. It also would have meant I would need to actually build and send more units to the same region to keep the momentum going, which by default would have meant less resources in the West to either invade England or repel the Allied invasions.

Of course, finding that right balance between too little or too much is always a challenge that designers have to continually deal with and refine.
 

civ2units

Emperor
Joined
Feb 1, 2009
Messages
1,088
Location
Somewhere in nowhere
Hello Curt,

if you add
Code:
and object.tJapanese.isHuman == false
to the first line of your code, the event only fires if the AI controls the civ.
If you set "False" to "True", the event only fires if the civ isn't controlled by the AI.

I've tested it in your Overlord scenario with Japan and it works. The event didn't fire because I controlled Japan, only the US declared together with their allies war on me. I think this is because you are using macro together with Lua.
When I change to another civ, the event fires when the AI controlled Japan researchs the tech "Pacific Campaign".

Your code should be look like this one:

Code:
--If the Japanese research "Pacific Campaign", the event will spawn Imperial Army and Navy forces to attack Allied cities...
if civ.hasTech(object.tJapanese, object.aJapPacificCampaign) and object.tJapanese.isHuman == false then
        gen.justOnce("JapanAttacks",function()
    civ.makeAggression(object.tJapanese, object.tAmericans)
    civ.makeAggression(object.tJapanese, object.tBritish)
    civ.makeAggression(object.tJapanese, object.tNeutrals)...

...end)
end
 

CurtSibling

ENEMY ACE™
Joined
Aug 31, 2001
Messages
29,293
Location
Innsmouth
Successfully tested the extra tech patch, and armed with that (and the Lua advice from Civ2Units) I am making a large range of improvements and changes to the scenario.
In addition to tidying up the tech tree, and re-assigning some wonders, (SETI to Japan, for instance) I will be able to make sure the US and UK allies have their own invasion
techs instead of the messy share system going on now...All of which will need some hammering away under the bonnet...But I think the final result will be a big step upward.

I'll keep you posted of the next update...For now, it's time to roll the sleeves up! :)
 

CurtSibling

ENEMY ACE™
Joined
Aug 31, 2001
Messages
29,293
Location
Innsmouth
I've decided to take advantage of the new ToTPP tech and unit extentions and plan out a version that uses all the new slots.
It will build on what I have already, which tons of new techs and hopefully Lua extended features...Here is a WIP unit list...
Ov_Max_Units_WIP1.png

Lots will change, and huge thanks to fairline for these units!
 
Last edited:

CurtSibling

ENEMY ACE™
Joined
Aug 31, 2001
Messages
29,293
Location
Innsmouth
Love the medals!

How do you plan to operationalize the flying boat?

Thanks, sir! Fairline made a few - :)

As for the Japanese patrol FB, I might make it a helo, with submarine abilities...
Or failing that, see if Lua can allow it to be a sea-based attacker, but still act like a bomber.

Some experimentation will be needed, I think. :D
 

JPetroski

Deity
SLeague Staff
Joined
Jan 24, 2011
Messages
4,598
As for the Japanese patrol FB, I might make it a helo, with submarine abilities...
Or failing that, see if Lua can allow it to be a sea-based attacker, but still act like a bomber.

There are options... You can "kick out" any attacks it makes against units with domain 0 if you'd like, for example. I "kicked out" attacks by the U.S. against the Neutrals (barbs) within a city in Cold War.

I put this in my unit killed section. There might be other ways to do it with initiateCombat or other events. With lua there's about thirty ways to do any one thing, I've found. The problem with my solution was that the unit was still technically killed so you might want to explore other options. But, "yes" you can figure out ways to make sure it only attacks sea units without having to give it the sub flag (with all the undesirable effects).

You can also remove the sub flag from the unit on everyone else's turn if only a particular civ uses the unit type. Then others can see it without the sub issues but the civ actually using it has the restrictions without the benefit.

Code:
if attacker.owner == object.tUSA and defender.owner == object.tNeutrals and defender.location.terrainType == 15 then
    civ.ui.text(func.splitlines("Congress has not authorized use to seize this Neutral City.  Attacks against cites of these nations can be conducted by our proxies, only.  The defending unit has been restored, and is now a veteran as it had a close look at our tactics."))
    civlua.createUnit(defender.type, object.tNeutrals, {{defender.location.x,defender.location.y,defender.location.z}}, {randomize=false, veteran=true})
end

Edit - even to me this looks like gobblygook but here's how I change the trireme flag for a unit each turn depending on a flag in case you wanted to add/remove the sub stuff. It might be even easier at this point with the general library - I could swear I saw something in there for it.

Code:
--Malta
if turn >= 1 and enoughDefendersInMalta() then
civ.getUnitType(10).flags = civ.getUnitType(10).flags | 0x20
    if flag.value("Afrika Korps") == true then
    civ.ui.text("The island fortress of Malta remains a thorn in our side... Submarines and aircraft patrol the Mediterranean, stretching the Afrika Korps' logistics thin...")
    end
else
civ.getUnitType(10).flags = civ.getUnitType(10).flags & ~0x20
    if flag.value("Afrika Korps") == true then
    civ.ui.text("Scouts report minimal enemy activity in the central Mediterranean this turn.")
    end
end
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
3,975
Location
Ontario
Edit - even to me this looks like gobblygook but here's how I change the trireme flag for a unit each turn depending on a flag in case you wanted to add/remove the sub stuff. It might be even easier at this point with the general library - I could swear I saw something in there for it.

gen.giveCoastal/gen.removeCoastal is one example. A lot of that stuff is documented here as flag functions. There is some more recent stuff that isn't documented there, but there is a list of comments and functions in the General Library file.

If anyone ever need anything done with 'bitmask' 'flags', let me know. Dealing with bitwise operations isn't even good practice for anything else you might want to do with Lua. Not to mention, the code is much less readable.
 

JPetroski

Deity
SLeague Staff
Joined
Jan 24, 2011
Messages
4,598
Yes! YES!!!! YESSSSSSS!!!!! I SEE THAT F4U CORSAIR!!!! WOOOOOOWOOOOOO!

That's it - when this goes live, I'm playing as America!
 

JPetroski

Deity
SLeague Staff
Joined
Jan 24, 2011
Messages
4,598
By the way (and it may be more trouble than it's worth), but are you restricting which units can be used with carriers?
 

CurtSibling

ENEMY ACE™
Joined
Aug 31, 2001
Messages
29,293
Location
Innsmouth
Yes! YES!!!! YESSSSSSS!!!!! I SEE THAT F4U CORSAIR!!!! WOOOOOOWOOOOOO!

That's it - when this goes live, I'm playing as America!

It's criminal that I had not yet added this splendid USN fighter, fixing that now...:)
I might too play as the USA...Conquer the world for democracy and ass-kickery!

By the way (and it may be more trouble than it's worth), but are you restricting which units can be used with carriers?

I'll definitely be open to any Lua method that is not too exotic to implement. :)
 

JPetroski

Deity
SLeague Staff
Joined
Jan 24, 2011
Messages
4,598
I'll definitely be open to any Lua method that is not too exotic to implement

It's not that hard to implement. Prof. Garfield may have made it even easier since OTR/Cold War in his template, but the basic idea is:

You put together the units that can use a carrier into a table:

Code:
-- AIRCRAFT CARRIER CODE
-- p.g. Indexed by unittype id.  If entry is true, the unit can use the carrier.  If missing or false, the unit can't.
-- Any carrier must also be in this list, with entry true
-- munitions also use carrier, to ensure carrier is not air stack protected by its cargo
local useCarrier = {}
useCarrier[object.uCarrier.id] = true
useCarrier[object.uMiG15.id] = true
useCarrier[object.uMiG19.id] = true
useCarrier[object.uMiG21.id] = true
useCarrier[object.uMiG23.id] = true
useCarrier[object.uMiG25.id] = true

In your unit activation events, you check and see if the activated air unit is or isn't in that table. If it is in that table, then you set the carrier unit in the game to have the "can carry air unit flag." If the aircraft is not in the table, you remove the "can carry air unit flag" from the carrier units. This effectively means that your aircraft unit won't "stop/land" when they go to a tile with a carrier as they normally do.

Code:
if useCarrier[unit.type.id] or unit.type.flags & 1<<12 == 1<<12  then
        object.uCarrier.flags = specialNumbers.defaultCarrierFlags
 
    else
          object.uCarrier.flags = specialNumbers.doNotCarryCarrierFlags
    end

(note that "object.uCarrier" is the carrier unit in this example.

With that being said, the AI is likely hopeless at using this, but then, they're pretty hopeless at carriers in the first place!

Edit: in the above code you'd also need to have a table with the actual flag codes.

Code:
local specialNumbers ={}
specialNumbers.defaultCarrierFlags = 128 -- carrier flags when the active unit can use the carrier
specialNumbers.doNotCarryCarrierFlags = 0 -- carrier flags for when unit activated can't be carried by carrier

Again, there may well be a different way to do it by now.
 
Top Bottom