Special custom unit pre-game build

Developers and contributors can find a link to our github page and engage in development project planning here.
Post Reply
Message
Author
User avatar
Flame
Posts: 116
Joined: Tue Oct 24, 2017 6:16 am
Location: Ukraine
Karma: 70
Contact:

Special custom unit pre-game build

#1 Post by Flame » Wed Dec 28, 2022 7:59 am

Dear Sirs!

1) I am about to release the new webDip map variant with a special rule.
The thing is that the very first stage of the game is a build-phase (winter). Some countries has an opportunity to chose type of the units to build. And some countries has a fixed array of unit to be build (as in classic).

Please help me how to change the code. This option will surely add more diversity to the gameplay.

2) Also (it's not the point I'm interested much in this post) in future we can face with variant creation in which we will want to have some fixed builds and some free to chose builds for every country.
WebDiplomacy enthusiast. Adaptor of webdiplomacy variants: Classic Cataclysm, Classic 1898, Classic 1898 Fog of War, Punic Wars, Western World 901, 13th Century Mongolian Empire, Speed Europa, Minor Power.

User avatar
Jamiet99uk
Posts: 29456
Joined: Sat Dec 30, 2017 11:42 pm
Location: Durham, UK
Karma: 18259
Contact:

Re: Special custom unit pre-game build

#2 Post by Jamiet99uk » Thu Dec 29, 2022 11:18 pm

Flame wrote:
Wed Dec 28, 2022 7:59 am
Some countries has an opportunity to chose type of the units to build. And some countries has a fixed array of unit to be build (as in classic).
Which are which?
1
There are decades where nothing happens, and there are weeks where decades happen. - Lenin.

User avatar
Flame
Posts: 116
Joined: Tue Oct 24, 2017 6:16 am
Location: Ukraine
Karma: 70
Contact:

Re: Special custom unit pre-game build

#3 Post by Flame » Fri Dec 30, 2022 3:59 am

Jamiet99uk wrote:
Thu Dec 29, 2022 11:18 pm
Flame wrote:
Wed Dec 28, 2022 7:59 am
Some countries has an opportunity to chose type of the units to build. And some countries has a fixed array of unit to be build (as in classic).
Which are which?
For example in the game-variant for 7 powers on the board:
in the first game phase we got build-phase:
- Power1, Power2, Power3 has the fixed arrays of builds:
A SC1-1, A SC1-2, F SC1-3;
A SC2-1, F SC2-2, F SC2-3:
A SC3-1, F SC3-2, F SC3-3.
- Power4, Power5, Power6, Powers7:
they are allowed to chose their build in the build-phase.

In the /classes/adjudicatorPreGame.php
we use separately both variants of builds in many variants.
But never when these two are combined.
WebDiplomacy enthusiast. Adaptor of webdiplomacy variants: Classic Cataclysm, Classic 1898, Classic 1898 Fog of War, Punic Wars, Western World 901, 13th Century Mongolian Empire, Speed Europa, Minor Power.

User avatar
Jamiet99uk
Posts: 29456
Joined: Sat Dec 30, 2017 11:42 pm
Location: Durham, UK
Karma: 18259
Contact:

Re: Special custom unit pre-game build

#4 Post by Jamiet99uk » Sun Jan 01, 2023 4:35 pm

No, I meant which countries?

For instance, does England get a choice, but Germany does not? And if so, why?
There are decades where nothing happens, and there are weeks where decades happen. - Lenin.

User avatar
Flame
Posts: 116
Joined: Tue Oct 24, 2017 6:16 am
Location: Ukraine
Karma: 70
Contact:

Re: Special custom unit pre-game build

#5 Post by Flame » Tue Jan 03, 2023 12:24 pm

Jamiet99uk wrote:
Sun Jan 01, 2023 4:35 pm
No, I meant which countries?

For instance, does England get a choice, but Germany does not? And if so, why?
Due to the variant special rules. For example:
We develop a new variant to play. Several powers are big, others are small. But small countries has an advantage to chose their builds at the start build-phase. Small countries have a possibility to co-operate and work out a long list of debuts. Big ones got fixed builds with no option to change the strategy but they have one or two units more at the very start.
1
WebDiplomacy enthusiast. Adaptor of webdiplomacy variants: Classic Cataclysm, Classic 1898, Classic 1898 Fog of War, Punic Wars, Western World 901, 13th Century Mongolian Empire, Speed Europa, Minor Power.

User avatar
Flame
Posts: 116
Joined: Tue Oct 24, 2017 6:16 am
Location: Ukraine
Karma: 70
Contact:

Re: Special custom unit pre-game build

#6 Post by Flame » Tue Jan 03, 2023 12:34 pm

Flame wrote:
Tue Jan 03, 2023 12:24 pm
Jamiet99uk wrote:
Sun Jan 01, 2023 4:35 pm
No, I meant which countries?

For instance, does England get a choice, but Germany does not? And if so, why?
Due to the variant special rules. For example:
We develop a new variant to play. Several powers are big, others are small. But small countries has an advantage to chose their builds at the start build-phase. Small countries have a possibility to co-operate and work out a long list of debuts. Big ones got fixed builds with no option to change the strategy but they have one or two units more at the very start.
Or we even can go further:
in the adjudicatorPreGame.php or variant.php we can do smth like this for every power and in any variant:
1. England: "F EDI, F LON, A YOR (fixed)";
2 ...

It means at the start England will get an army in York but has an option to change the default builds in Edi & London.
WebDiplomacy enthusiast. Adaptor of webdiplomacy variants: Classic Cataclysm, Classic 1898, Classic 1898 Fog of War, Punic Wars, Western World 901, 13th Century Mongolian Empire, Speed Europa, Minor Power.

User avatar
Flame
Posts: 116
Joined: Tue Oct 24, 2017 6:16 am
Location: Ukraine
Karma: 70
Contact:

Re: Special custom unit pre-game build

#7 Post by Flame » Fri Mar 03, 2023 6:31 pm

So, I start the job.
But I ask help in the following tasks:
1. Major powers should have fixed builds (this time all powers can chose their builds in the pre-game phase)
2. Minor powers should bet 1/3 of the full stake to enter the game.

Variant page:
https://webdiplomacy.ru/variants.php?variantID=222

First test game. Please join to test and develop:
https://webdiplomacy.ru/board.php?gameID=12804
WebDiplomacy enthusiast. Adaptor of webdiplomacy variants: Classic Cataclysm, Classic 1898, Classic 1898 Fog of War, Punic Wars, Western World 901, 13th Century Mongolian Empire, Speed Europa, Minor Power.

User avatar
Flame
Posts: 116
Joined: Tue Oct 24, 2017 6:16 am
Location: Ukraine
Karma: 70
Contact:

Re: Special custom unit pre-game build

#8 Post by Flame » Thu Mar 09, 2023 10:10 am

If smbd is willing to help with coding special variant features mensioned above - here we have the source-files of variant:
https://webdiplomacy.ru/files.php?variantID=222
1
WebDiplomacy enthusiast. Adaptor of webdiplomacy variants: Classic Cataclysm, Classic 1898, Classic 1898 Fog of War, Punic Wars, Western World 901, 13th Century Mongolian Empire, Speed Europa, Minor Power.

User avatar
Flame
Posts: 116
Joined: Tue Oct 24, 2017 6:16 am
Location: Ukraine
Karma: 70
Contact:

Re: Special custom unit pre-game build

#9 Post by Flame » Sat Apr 22, 2023 7:19 am

Flame wrote:
Fri Mar 03, 2023 6:31 pm
So, I start the job.
But I ask help in the following tasks:
1. Major powers should have fixed builds (this time all powers can chose their builds in the pre-game phase)
2. Minor powers should bet 1/3 of the full stake to enter the game.

Variant page:
https://webdiplomacy.ru/variants.php?variantID=222

First test game. Please join to test and develop:
https://webdiplomacy.ru/board.php?gameID=12804
I found smth similar in The Dutch Revolt variant source-code.
I mean the special fixed builds for certain powers.
https://vdiplomacy.net/variants.php?variantID=32
WebDiplomacy enthusiast. Adaptor of webdiplomacy variants: Classic Cataclysm, Classic 1898, Classic 1898 Fog of War, Punic Wars, Western World 901, 13th Century Mongolian Empire, Speed Europa, Minor Power.

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests