<< Back to Programming Forum   Search

Posts 1 - 5 of 5   
Expiry of active cards: 3/24/2021 20:38:37

Level 54
Hello modders,

I've been into modding for some weeks now and working on yet another diplo mod. I think I can make some improvements, but also to practise modding. The goal is to enforce peace/alliance with diplo cards.

One of the things I'm doing now, is keeping a list ID's of diplo cards that are played by the mod. After each turn, I would like to remove the cards with these ID's from the LatestTurnStanding.ActiveCards when someone declared war on another player. However, while LatestTurnStanding is writeable, according to "function PrintProxyInfo(obj)", ActiveCards is not. I've been thinking to entirely copy the LatestTurnStanding, alter the ActiveCards in the copy, and write the copied standing back to the LatestTurnStanding in its entirety. However, unfortunately, the fact that ActiveCards is readOnly, is then also copied over to the copy. Also, it would be a bit hacky.

Has anyone succesfully been able to alter the active cards, or is this just hardcoded and thereby impossible?

What I want to do with it, is implement a Blitzkrieg card, which enables a player to immediately go to war with an ally/peace and attack right away.

If none of this is possible, would there be a way to pass the amount of turns when the mod plays a diplo card?
Expiry of active cards: 3/24/2021 20:43:42

Level 60
Take a look at the Diplo v4 mod. I think some of what you're trying to accomplish is already available in that mod.

And whatever you're looking to add might be better added to this mod ... not sure though.

As for Blitzkrieg ... scary idea! Kind of goes against the whole idea of having allies or being at peace and having to declare... but sure, it could have it's place in some games, I suppose ... but imho probably done best as part of the diplo which already enforces War/Peace/Ally states, so would be reasonable to implement a Blitzkrieg option to jump from Peace/Ally to War. Hopefully that'd be implemented as not only Optional from the host, but also # of times/delays/etc it can be done (else the whole Peace/Ally concept has no meaning).
Expiry of active cards: 3/24/2021 21:18:37

Level 54
Thanks for the quick reply krinid.

I know the AdvancedDiplo v4. However, there alliances/peace is enforced through orders that get skipped. Although I personally think that mod works fine, I get a some reactions that it's a bit unclear for newer players that you cannot attack when not in war with someone. With a diplo card played, you would get the regular warning from a diplo card when attempting to attack an ally/peace.

Your suggestions around the Blitzkrieg card are nice, yes. Especially a max amount of times Blitzkriegs can be played.
Expiry of active cards: 3/25/2021 20:49:16

Level 60
Agree, skipping orders is not a great way to implement it, but unfortunately that's all most mods have to work with. :(

Limited Multiattack suffers a worse fate b/c you can have 95% of your inputed moves skipped without realizing it until the turn advances, which wrecks people who don't understand how the mod works.
Expiry of active cards: 3/27/2021 00:10:59

Level 57
I guess you could modify Diplo mods to work with Diplo cards, but there are limitations to this(see spy cards advanced Diplo mod):
You need to have the Diplo card in the game (the only way to play without it but use that system, is using really high piece counts)
You would need to limit the duration to 1 turn-> can not have without a lot of modification Diplo cards that work longer

It's not possible to remove cards that are played already as far as I am aware.
I just wish there would be a way to have more access to the system, but as far as I am aware there is no update for the mod framework planned(guess there just isn't enough people who created mods with it)
What would be needed to prevent that:
-Way to modify the menu when attacking/transferring(min, max army limit, special units, way to block adding invalid orders)
-Way to block certain orders from being submitted(verification before pressing commit, to e.g. warn about orders that are definitely invalid)
-Access to territory connections(hide/block connections between territories that would cause orders that are not intended with the mod)
-Way to modify the deploy menu(min, max, deployment value)

But well without that, its just easier and in my opinion better to just use skip orders

Edited 3/27/2021 00:11:50
Posts 1 - 5 of 5