Script ideas

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Script ideas

Unread postby Siegfried » 16 Jan 2006, 07:45

Hi,

i have a script ready that might be interesting for WoG next version: A Peasant script. It is according to my original ideas i posted once at the astral wizards site when there where collected wishes for HoMM 4.

Foer each day, any peasant in a town (in town garrison only) with a village hall, each of them produces 1 Gold. Town hall, city hall and capitol add 1 gold per peasant. Market place adds another gold.

If the town has a garrison hero with estates, each peasant produces 1/2/3 additional gold, depending on the estates level. If this garrison hero is a gold specialist, the result for that town is doubled. If the hero is another resource specialist, then every 1000 peasants in that town produce 1 of that resource.

Every peasant in a mine (mine guard) may increase the production of that mine. For wood and ore, 500 peasants increase the production of that mine by 1, for other mines, 1000 peasants increase the production of that mine by 1.

Peasants outside of towns or mines do not produce anything.

I am currently thinking of the Grail doubling the peasant gold production another time.

If this is interesting, i would upload the script so it may be downloaded. It currently does not check the enable/disable script flag, because it is not integrated in the wogification menu.

The script is quite interesting on maps with few resources as you may set up a proper economy with peasants. But you have to move them to a town or mine to make them productive (different to HoMM 4), so simply collecting them is not sufficient. You may want to concentrate them in your capitol to maximize production, but then you have 1 slot less for regular army, which might be a disadvantage if the capitol is attacked. So this script in total moves the focus from simple military strategies more to an economic/military strategy combination.

Regards
Siegfried

User avatar
DaemianLucifer
Round Table Hero
Round Table Hero
Posts: 11282
Joined: 06 Jan 2006
Location: City 17

Unread postby DaemianLucifer » 16 Jan 2006, 08:57

Yes,that sounds like a very nice idea.Id like to try it out.

User avatar
Pol
Admin
Admin
Posts: 10057
Joined: 29 Nov 2005
Location: IN SOMNIS VERITAS
Contact:

Re: Script ideas

Unread postby Pol » 16 Jan 2006, 09:03

Sounds, very interesting to me.

Could you also upload it to:

http://games.groups.yahoo.com/group/WoGMapArchives2--Files--ERM Scripts

Thanks,
Pol
"We made it!"
The Archives | Collection of H3&WoG files | Older albeit still useful | CH Downloads
PC Specs: A10-7850K, FM2A88X+K, 16GB-1600, SSD-MLC-G3, 1TB-HDD-G3, MAYA44, SP10 500W Be Quiet

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

script

Unread postby Siegfried » 16 Jan 2006, 10:09

o.k., i'll try this evening or tomorrow. At the moment i do not have access to it :)

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Unread postby Gaidal Cain » 16 Jan 2006, 11:43

Sounds interesting. One question though: where do you suppose that the player would find those thousands of peasants that's required to increase mine production etc?

One possible solution would be to let the player transform his level units to peasants (or the other way around: every level 1 dwelling produces peasants, which has to be upgraded). Or building a City hall would not increase gold production straight away, but rather give you an extra bunch of peasants to use.

The script has promise, but unless it's coupled with some way to easily recruit peasants, I don't think it'll be very interesting in the end.
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Peasants

Unread postby Siegfried » 16 Jan 2006, 12:24

Hi,

well, yes and no. The problem is indeed getting enough peasants. Although in a capitol, which has to hav a market place, 200 peasants would be enough to replace a complete gold mine! So this is not too difficult. But indeed at least you would need some peasants to recruit. With a weekly production of 25 peasants in one dwelling you would need two complete months to build up an income equivalent of one gold mine.

With a gold specialist with master estates the calculation is better (although getting master estates would itself take time to get). A more realistic example would be putting Lord Haart in the capitol. He is a gold specialist with basic estates. So with this asembly you would get 12 gold per peasant per day. That would take 84 peasants. Within one month you get 100 peasants out of one dwelling which would result in 1200 daily gold production, slightly more than one gold mine. Within that one month you should be able to build up a capitol. So this is realistic.

But there is one more difficulty to it: Peasants are very slow. So taking them from the dwelling home to the capitol will take time. But this is intentional. Giving a player everything he needs to build up really fast is not the intention here. Giving the player only the minimum of resources adds the decision of what and when to build and when not to build. It adds the decision of focussing on a fast but limited military production or on first building up economy and thus waiting with military buildup until economy is capable of supporting that.

I have already thought of maybe a 10% peasant growth in a town if some building is built, but then decided not do do that. I think it is more fun to let the player develop the proper logistik structures to get the peasants to the capitol in numbers and by time.

The idea of "downgrading" any creature to peasants is interesting though :D i really like that idea. I will think about it, but it will not be part of the first release of that script. And if, it should be limited to living creatures. Funny idea: Downgrade a Supreme Archangel to a peasant :D Whow that player must be in real desperate need for gold.

Basically it depends on the map. If you have enough mines you don't need peasants. If you have few mines but peasants instead they could be a useful mine replacement, although somewhat more difficult to handle.

Currently i'm developing a map which might be useful as a test scenario for that script. As soon as i get the buggy "moving town" feature working somehow the map will be published. Or it will be published at the end of this month without that feature.

Regards
Siegfried

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

gold mine

Unread postby Siegfried » 16 Jan 2006, 12:31

Hi,

one thing i forgot to mention: One peasant in a gold mine increases the production of that gold mine by one. Such a gold mine then produces 1001 gold per day :)

Regards
Siegfried

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Re: Peasants

Unread postby Gaidal Cain » 16 Jan 2006, 12:53

The problem is that you assume the presense of a peasant dwelling. If your script is intended to really create more depth in the game, it can't just rely on the random chance that there is such a dwelling- you'll have to find some way to guarantee that all players can recruit peasants, or it will be a script that's interesting, but seldom of any importance.
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Peasant dwelling

Unread postby Siegfried » 16 Jan 2006, 13:15

Hi,

that is indeed a problem. But i do not like the idea very much to replace things on a map while wogifying it. It sometimes produces unplayable maps. What might be interesting in any map is to modify the "week of the whatever" script to more often produce a "week of the peasant". But that would mean to modify an existing script.

What may be interesting too would be an option to manually replace any dwelling with a peasant dwelling. That should cost something, let's say, 500 Gold and all current movement points, but that could be an interesting option. Another idea might be an additional option on visiting some chests to build a peasant dwelling out of that chest. But in some cases that would produce unplayable maps. But since this is a manual chosen option this may be a way to go, too. Ideas are welcome.

Or what about the option to build a peasant dwelling out of any of those resource piles once and there? Might be easier than to add an option to the chests.

Regards
Siegfried

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Unread postby Gaidal Cain » 16 Jan 2006, 13:45

Well, I'm not sure. Having Village/Town/City halls produce peasants might be one way to go- one could even let them produce less as the town grows, and thus make for an interesting conflict: wait to upgrade to get more gold later, or do it now to get more quicker. :libra:
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Peasants in town

Unread postby Siegfried » 16 Jan 2006, 14:28

Hmmm, i could make them recruitable by clicking on those small houses not used for anything else.

The other idea, decreasing peasant production on upgrading the town building is strategically interesting, but on other aspects pointless. May be best way would be to make the production constant. Most logically would be increase production with town upgrade (not with fort upgrade). I'll think about that. But it will not be implemented in this first releast. May be in next release. May be end of february.

I have another script currently cooking: A chance for any hero to increase his primary skills after each won battle. This depends on a prerequisite secondary skill (learning for attack and defense, sorcery for power and eagle eye for knowledge), and the chance then depends on 4 more secondary skills. I want to finish that and add more battle and skill related stuff to that, before i update the peasant script.

Regards
Siegfried

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Re: Peasants in town

Unread postby Gaidal Cain » 16 Jan 2006, 14:42

Siegfried wrote:Hmmm, i could make them recruitable by clicking on those small houses not used for anything else.
Most logically would be increase production with town upgrade (not with fort upgrade).
One could see it as the town grows, it no longer is so rural and thus is home to fewer and fewer "peasants". Of course, one could view any poor person as a peasant, but I think that increasing their growth with other infrastucture would make the town income grow to quickly (you get both more peasants AND more money from them). Anyway, it's your script, and in the end, you do as you wish.
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

peasant growth

Unread postby Siegfried » 16 Jan 2006, 15:26

Hi,

well, i'm always open to good ideas. Not, that i will implement all of them, but in case any ideas i find interesting... :)

Regards
Siegfried

User avatar
Vlaad II
Demon
Demon
Posts: 318
Joined: 06 Jan 2006
Location: HC

Unread postby Vlaad II » 16 Jan 2006, 18:51

You might want to know that there already is a similar script by Ditje. It is old and simpler than yours, though.

I have added the last two lines which explain the new ability.

I used this script in my map called Gelu's Legacy 2 (2003). The player must carefully decide when to upgrade his Paesents to Archers - he needs gold for building up, but he also has to defend against a more powerful AI.

Here's the script:

ZVSE
AUTO_PoweredBy=ERM Script Editor v.1.2.6.10
** Peasant Script by Dieter Averbeck Version 1.1
** H4 Peasanss - gives 1 gold Tax for every Peasant in
** Heroes Army (no Peasants, sitting work less in castles)

** This script works also for AI. To use it as wogify script
** just save a copy in "Data" in the Heroes Home folder

** Increases the Hitpoints, Attack, Defense and Damage Maximum to 2

** Used Vars: FU150, FU151, TM15

!#MA:P139/2 A139/2 D139/2 E139/2;
!#TM15:S1/999/1/255;

!?TM15;
!!DO150/0/155/1:P;

!?FU150;
!!OW:C?y1; ** check current player
!!HEx16:O?y2; ** check owner
!!DO151/0/6/1&y1=y2:Px16/y2;

!?FU151;
!!HEx1:C0/x16/?y1/?y2;
!!VRy3&y1=139:Sy2;
!!VRy3&y1<>139:S0;
!!OW:Rx2/6/dy3;

!#VRz33:S^Pay taxes (1 gold per day).^;
!!UN:G1/139/2/33;

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Peasants

Unread postby Siegfried » 17 Jan 2006, 07:52

Hi,

@Vlaad: Thanx, i did not know that. In this script there are 2 things i intentionally decided not to include:
  • Upgrade peasants. I thought of upgrade peasants to the level 1 creature of that town, but that would make the necromancer speciality, the skeleton converter, obsolete. So i decided not to allow a peasant upgrade.
  • Any peasants produces 1 gold, no matter where he is. I think, more interesting is to first "install" the peasant in a town or mine to make him productive. So the peasant tax paying is just an option, not an automatically included feature.
Nevertheless the idea of that script is interesting. But it seems that it would be no good to use both scripts. One of them should be sufficient.

@Caidal: You are absolutely right. The gold production might increase too much. Although i thought of a production of 10/15/20/25 in village/town/city/capitol, not more. But with that low production only peasants would have nearly no importance. This script is interesting if there are some (more than 1) peasant dwellings on the map. The peasant production in the towns may be of any significance only in extremely tight balanced maps, where some hundred gold may make the difference.

The script will be downloadable from my webspace in about 2 hours from now: http://www.rorkvell.de/tmp/script81.erm

I'll upload it to the link mentioned above today.

Regards
Siegfried

Oops - this needs a Yahoo account, which i do not have. Could anyone with that account upload it there? THX.

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Help?

Unread postby Siegfried » 18 Jan 2006, 05:49

Hi,

yesterday i found a bug in the script. I used the macro $AI$ to decide wether to show a message or not. But the message is shown anyway. What do i have to check if i want to show a message only to the human player sitting in front of the screen?

Regards
Siegfried

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Unread postby Gaidal Cain » 18 Jan 2006, 07:33

You can try to use the flag 1000 to check if it's a human or AI- it's set to "true" if it's a human, and should work fine in most cases.
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett

User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Bug

Unread postby Siegfried » 18 Jan 2006, 09:16

THX, new version will be uploaded this evening.

------------------------------------------------

Sorry, it is somewhat different, more complicated to correct. I already used that flag (this is the macro $AI$). The problem is that i used timer 2 with the $once$ flag, so this always triggers for the first player, which is always human. I have to restructure that so that this trigger is called for every color and then check if the found cities and mines match that color.

For now the easiest way would be to simply disable the message. It is not necessary for funtionality.

Regards
Siegfried

doom4d
Leprechaun
Leprechaun
Posts: 5
Joined: 31 Jan 2006

magic system improvement

Unread postby doom4d » 01 Feb 2006, 19:52

Hi!

I have only an idea, without any script behind:
It would be nice to count how many times a hero has used a single spell, and to give him/her level bonuses afer it./less mana,less movement point used, better effectiveness/ Spell specialist may have more bonus for their spells.
For exemple, range of Ddoor and TownPortal might be level dependent. Magic arrow may have more damage if more frequently used, and so on..
Levels for a spell casted N times could be around
SQRT(N/10+1)) or LOG2(N/10+2) ..
Only problem is, that we may store the numbers in w vars, so it may increase the size of savegames around 15K.. Or 7K, if we put two 16bit numbers into 1 w var. Anybody interested? Do we have similar scripts? I may do it, but have small amount of time.


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 4 guests