~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» Ragoon's Graphics For HoMM3SW
by xxswwxx Today at 10:33

» [Script System][Suggestions] MakeCreatureVanish(creature) and more
by Unknown_Hero Today at 05:49

» [Script System][Suggestions] GetArmyStrength(hero, creature) and more
by Unknown_Hero Today at 05:48

» [Script System][Suggestions] GetCreatureCost(creature, resource) and more
by Unknown_Hero Today at 05:47

» [Script System][Suggestions] GetResourceGeneratorNumber(resource, player) and more
by Unknown_Hero Today at 05:46

» [Script System][Suggestions] GetMarketplaceExchangeRate(player) and more
by Unknown_Hero Today at 05:45

» H3SW General Discussion
by Zadr Yesterday at 04:38

Poll
"Wait" in HoMM2?
Yes
80%
 80% [ 37 ]
No
20%
 20% [ 9 ]
Total Votes : 46
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
H3SW Map List: Work in progress
Dervish Faction General Concept
Enrothian Fan Art
H3SW Recruitment Point - Enroth Needs You!
Серия книг "Земли Меча и Магии"
Introduce yourself

Post new topic   Reply to topicShare | 
 

 Scripting enhancements

View previous topic View next topic Go down 
AuthorMessage
Orzie
Master Modder
Master Modder
avatar

Messages : 1429
Quality Points : 579
Registration Date : 2014-12-12
Age : 25
Location : Tomsk, Russia

PostSubject: Scripting enhancements   2015-06-30, 19:28

Just for those who don't keep track of our Ironfist Wiki changes, I will try to keep record here.

Today's adjustments:

ShareVision(p1, p2)
p1:A number (0-5) determining a player
p2:A number (0-5) determining a player.

Allows player number p2 to see everything that player number p1 can see.
Note that player number 0 is the first human player, not necessarily the blue player.


See "Scripting Documentation" on Ironfist Wiki

________________________
In case someone cares for my music:
Mylinks_profile_page


Last edited by Orzie on 2015-07-20, 19:06; edited 1 time in total
Back to top Go down
Orzie
Master Modder
Master Modder
avatar

Messages : 1429
Quality Points : 579
Registration Date : 2014-12-12
Age : 25
Location : Tomsk, Russia

PostSubject: Re: Scripting enhancements   2015-07-17, 02:56

Do you hate having to write down passwords for those border guards? So do we. With the release of Ironfist 0.8.2, now you don’t have to.


________________________
In case someone cares for my music:
Mylinks_profile_page
Back to top Go down
GodRage
Webmaster
Webmaster
avatar

Messages : 571
Quality Points : 133
Registration Date : 2009-09-21

PostSubject: Re: Scripting enhancements   2015-07-17, 03:23

But if we "don't know" the password, can we still try to guess it?
Sometimes it was funny to open theses gates with random words... Razz

Otherwise it's very nice because it was kind of boring... Razz

________________________
~Lands of Enroth~
Back to top Go down
http://homm2.free.fr
Orzie
Master Modder
Master Modder
avatar

Messages : 1429
Quality Points : 579
Registration Date : 2014-12-12
Age : 25
Location : Tomsk, Russia

PostSubject: Re: Scripting enhancements   2015-07-17, 03:28

Of course you cannot guess it, just like in a normal game you wouldn't be able to pass the barrier before you visit the Tent.

The specific word used for barriers is left just for the atmospheric feel.

________________________
In case someone cares for my music:
Mylinks_profile_page
Back to top Go down
GodRage
Webmaster
Webmaster
avatar

Messages : 571
Quality Points : 133
Registration Date : 2009-09-21

PostSubject: Re: Scripting enhancements   2015-07-17, 03:45

Someday the word was Titan, and I found it... (usually the word is HeroesII related..).. So I did cross the gate without having visited the Tent. ^^ That was possible in HeroesII, but impossible in HeroesIII. Twisted Evil

________________________
~Lands of Enroth~
Back to top Go down
http://homm2.free.fr
Orzie
Master Modder
Master Modder
avatar

Messages : 1429
Quality Points : 579
Registration Date : 2014-12-12
Age : 25
Location : Tomsk, Russia

PostSubject: Re: Scripting enhancements   2015-07-17, 03:47

It was not possible in Heroes 2 either. If such bug will appear in Project Ironfist, it should be removed.

________________________
In case someone cares for my music:
Mylinks_profile_page
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 158
Quality Points : 26
Registration Date : 2014-12-27

PostSubject: Re: Scripting enhancements   2015-07-17, 09:49

It's possible that was the case in some release of PoL. But I tested in my version of Heroes II Gold (using save-reload abuse) and also checked the source code: you cannot open the guard without visiting the tent.
Back to top Go down
GodRage
Webmaster
Webmaster
avatar

Messages : 571
Quality Points : 133
Registration Date : 2009-09-21

PostSubject: Re: Scripting enhancements   2015-07-17, 10:35

Ehhh.. I was trusting it was an HeroesII ability... Sad
I apoligize for mi mistake. Smile
but it would be a good feature... maybe not for gate, but a kind of box of something where there is like a number-lock... but mah.. it fits more the H3 "artefact box that can contain other artefacts and spells and gold and.." ^^

________________________
~Lands of Enroth~
Back to top Go down
http://homm2.free.fr
GodRage
Webmaster
Webmaster
avatar

Messages : 571
Quality Points : 133
Registration Date : 2009-09-21

PostSubject: Re: Scripting enhancements   2015-07-18, 02:15

I just tried back in my French PoL 2.0: and it works! I didn't see the Tent, but I can write a word to try to open the gate. (Blue Tent... But I think it's related to french game or 2.0 version...)

________________________
~Lands of Enroth~
Back to top Go down
http://homm2.free.fr
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 281
Quality Points : 33
Registration Date : 2015-09-06

PostSubject: Re: Scripting enhancements   2015-09-18, 08:36

Passwords and border guards.
This is really great, no more need to write the password on a piece of paper (and eventually lose it), a nice change for the player's "quality of life". Smile

Shared vision.
Will there be a way to assign that possibility to an artifact?

Ex:
If the hero has this artifact, he can see the whole map revealed by all the heroes of the red player.
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 158
Quality Points : 26
Registration Date : 2014-12-27

PostSubject: Re: Scripting enhancements   2015-09-20, 14:05

Unknown_Hero wrote:

Shared vision.
Will there be a way to assign that possibility to an artifact?

Ex:
If the hero has this artifact, he can see the whole map revealed by all the heroes of the red player.

It already is possible, except that it can't be turned off when the player loses an artifact. You can write a script that checks if any of a players heroes has the artifact at the start of each day.
Back to top Go down
Tibor0803
Pikeman
Pikeman
avatar

Messages : 37
Quality Points : 10
Registration Date : 2015-08-09
Age : 25
Location : Budapest, Hungary

PostSubject: Re: Scripting enhancements   2015-09-20, 21:46

Basically, I hate borders in-game. I like Pol version of HeroesII, but the borders make me a headache and always required another scouting hero to find the tent before we want to visit the right coloured border with the knowledge of the magic word, without it I cannot keep up venturing which is just one of the troll side of the game. The other one is when you use a one way portal and on the other side there is no way to avoid a last level creature and your hero is screwed, forced to push the retreat button in battle with them.
Back to top Go down
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 281
Quality Points : 33
Registration Date : 2015-09-06

PostSubject: Re: Scripting enhancements   2015-09-22, 07:24

Darmani wrote:
Unknown_Hero wrote:

Shared vision.
Will there be a way to assign that possibility to an artifact?

Ex:
If the hero has this artifact, he can see the whole map revealed by all the heroes of the red player.

It already is possible, except that it can't be turned off when the player loses an artifact.  You can write a script that checks if any of a players heroes has the artifact at the start of each day.

You mean it's already available in the "game engine", but it's not possible to link it currently to an artefact (a new one), right?

Here, a check at the end of the day will be more appropriate.

@Tibor0803

They introduced some RPG elements in POL (Tent and Boarder Gate ,Spell Scroll, etc.); what I dislike the most in POL is the possibility to recruit Elementals (it makes generaly crappy AI armies), for me they should be only available with the spells.
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 158
Quality Points : 26
Registration Date : 2014-12-27

PostSubject: Re: Scripting enhancements   2015-09-23, 08:48

It is possible to make it so that a player gets that ability after any of his heroes gets the artifact. You could argue this doesn't count as "directly linking" it to the artifact, but the distinction is very weak (other than not being able to turn off shared vision).
Back to top Go down
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 281
Quality Points : 33
Registration Date : 2015-09-06

PostSubject: Re: Scripting enhancements   2015-09-24, 05:49

Being able to link the script to the artifact would avoid to "redo" the scripts for all the maps (old and new).
It would be nice if an artifact can "call" or "contain" a script, so, you don't have to "redo" the script for all the maps when you want to make an artifact does something specific.

Yes, not being able to turn off the shared vision is the problem.
Say a hero of the blue player has the artifact, so he can see the whole map revealed by all the heroes of the red player. But, if the hero lose the artifact, it should not see the map revealed by the heroes of the red player during the same day (same turn of the others players for the current day).
Here, a check at the end turn of the blue player would stop to display the map revealed by the heroes of the red player for the current turn.

*

Is there a way to make a "global script", per example "global.MX2.lua", "global.mp2.lua", so the script is applied to all the maps when they are loaded in the game (so, no need to redo the same script part for all the maps one by one)?
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 158
Quality Points : 26
Registration Date : 2014-12-27

PostSubject: Re: Scripting enhancements   2015-09-24, 06:33

Being able to add artifacts by scripting is planned. I believe Lua already allows you to include other files; this is preferable to a global script so map designers can know what their maps will look like, instead of having them work differently for every player.
Back to top Go down
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 281
Quality Points : 33
Registration Date : 2015-09-06

PostSubject: Re: Scripting enhancements   2015-09-24, 07:41

Darmani wrote:
Being able to add artifacts by scripting is planned.

Will it be possible to change/tweak the "effects" for the artifacts already in the game?

Darmani wrote:
I believe Lua already allows you to include other files

Smile

The global script would be more from "the side of the player" point of view, so he can quickly apply a change to all the maps, old ones (classic Heroes 2 maps) and new ones (Ironfist maps), he want to play.
Per example, give 10 wood and 10 ore to the red player (if present) at scenario start, for all the maps, without the need to make/change a script for each map.
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 158
Quality Points : 26
Registration Date : 2014-12-27

PostSubject: Re: Scripting enhancements   2015-10-01, 14:08

We do have the beginnings of plans for an overhauled artifact system which should allow you to change them in much the same way you can change creatures.

I still don't really understand the game-design benefit of the global scripts idea. To me, the suggestion sounds kinda like saying we should go through the entire United States legal code, and multiplying every number in every law by 2. That's not how the laws were designed, and, if you're going to change a law, you should consider each one individually.
Back to top Go down
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 281
Quality Points : 33
Registration Date : 2015-09-06

PostSubject: Re: Scripting enhancements   2015-10-03, 11:24

Darmani wrote:
We do have the beginnings of plans for an overhauled artifact system which should allow you to change them in much the same way you can change creatures.

Is there already an ETA for this?  Smile

Darmani wrote:
I still don't really understand the game-design benefit of the global scripts idea.

Say I add 3 new secondary skills, 3 new spells, and a dozen of new artifacts to the game with the Ironfist modding tool.

Now, I want to play the "original" scenarios of Heroes 2 with these additions (random secondary skills, random spells and random artifacts).

Can I play all the original scenarios with these additions automatically and simply by launching Ironfist.exe, or should I first made a specific script for each scenario?

If it's not "automatic", here comes the global script, so all the original scenarios can be played with the additions.

Another example, I want to play the original scenarios at the Impossible difficulty level (AI behavior), but I also want to have some ressources at start of the scenario instead of nothing (ex: 5 wood and 5 ore), again the global script (or some sort of global setting for ironfist.exe) here would be very handy.
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 158
Quality Points : 26
Registration Date : 2014-12-27

PostSubject: Re: Scripting enhancements   2015-10-04, 15:20

Okay. I understand your thinking better.

All scripts right now are tied to maps. When we expand support for artifacts, skills, spells, etc, there will be new kinds of scripts tied to those things and not tied to maps. The way we do this should make it easy to use

As for changing starting resources in Impossible difficulty....that's kinda not what the game designers intended. There are cheat codes for that if you really want to do that.
Back to top Go down
Orzie
Master Modder
Master Modder
avatar

Messages : 1429
Quality Points : 579
Registration Date : 2014-12-12
Age : 25
Location : Tomsk, Russia

PostSubject: Re: Scripting enhancements   2015-10-04, 16:40

It also can be regulated via timed events.

If you CAN change something, it does not yet mean you SHOULD. Smile

________________________
In case someone cares for my music:
Mylinks_profile_page
Back to top Go down
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 281
Quality Points : 33
Registration Date : 2015-09-06

PostSubject: Re: Scripting enhancements   2015-10-07, 06:27

Darmani wrote:
When we expand support for artifacts, skills, spells, etc, there will be new kinds of scripts tied to those things and not tied to maps. The way we do this should make it easy to use

I like this one. Very Happy

Darmani wrote:
As for changing starting resources in Impossible difficulty....that's kinda not what the game designers intended. There are cheat codes for that if you really want to do that.

The goal isn't to being able to cheat, Smile but to being able to adjust the game parameters depending the changes made to the game (the modding of the game); if I change the cost of creatures, etc., I want to be able to change parameters, per example, give 200% gold per turn to the AI players, etc. (adjust the game), actually, make the game more difficult for the experienced players, play differently, etc.

Orzie wrote:
It also can be regulated via timed events.

Timed events only work on a per scenario basis, so, modify all the scenarios 1 by 1.
The purpose here, is precisely to avoid this, and being able to change things globally, so testing, checking, adjusting, playing, whatever, the game in a more user friendly way.

Orzie wrote:
If you CAN change something, it does not yet mean you SHOULD. Smile

Where is the fun then? Smile
Back to top Go down
 
Scripting enhancements
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You can reply to topics in this forum
~ Forums of Enroth ~ :: Modding Guild :: Heroes of Might and Magic II: Project Ironfist-
Post new topic   Reply to topicJump to: