fheroes2 - Scripting Options

Discuss the development of other free/open-source games, as well as other games in general.

Moderator: Forum Moderators

Post Reply
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

fheroes2 - Scripting Options

Post by StevenAus »

Since it doesn't look like there will be a full-blown new map editor at this stage in the free heroes2 project (http://sourceforge.net/projects/fheroes2), I'm considering making a scripting-type system to add features to standard H2:PoL maps. My question is, do you think a WML-type system is a good way to go, or do you think straight XML is a better structural option? I know the formats share some similarities. Features would include extra text and extended event functionality for map objects, including towns, skill or spell enhancement sites, alliances for certain creature types (along with the ability to override the alliance option for specific creature stacks, to prevent maps getting too easy), ability to edit chances of creatures joining a hero's army (including never), bonuses or maluses to certain players (eg. gain/lose resources per turn, or reduction/increase to base hire costs for certain creature types), map and hero-specific variables, extended abilities screen for heroes and players, quests in towns/castles - overall or for specific players/heroes, and campaign functionality (this may have a basic H2-campaign-style campaign structure support from the fheroes2 game too). The overall system is still in the conceptual/planning stages, but I am interested to what you think about the best scripting system for developing and using for a turn-based strategy game. (Scripting seems like it would be a relatively simple way to add lots of functionality to the basic game without requiring the mod maintainer himself to devote a lot of resources to a new graphical map/campaign editor.)

So guys, what do you think? H2 is a game dear to my heart, and I have dabbled a bit with WML and seen some XML too, and am interested in your thoughts.

Best regards,
Steven.

PS: I probably wouldn't be doing the actual coding of the system, but I would be providing the syntax for the various commands to be introduced into the game. However, being relatively easy to create the initial system's code would still be an asset. And of course being relatively easy to script for (and still provide great functionality - a bit like WML's) is essential.
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment Is My Name And Fostering Self-Responsibility Is My Game.
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: fheroes2 - Scripting Options

Post by Sapient »

have you considered Lua?

writing your own scripting language can be fun and rewarding, but it is a large effort to say the least
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: fheroes2 - Scripting Options

Post by StevenAus »

Can Lua be customised for the task?

Best regards,
Steven.
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment Is My Name And Fostering Self-Responsibility Is My Game.
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: fheroes2 - Scripting Options

Post by 8680 »

Yes. For example, Wesnoth adds the wesnoth library, which contains mostly functions for accessing stuff in the C++ engine, and removes the io, coroutine, and package libraries and much of os.
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: fheroes2 - Scripting Options

Post by StevenAus »

Is it a major effort to add a relevant library for a game, remove access to libraries that could be a security risk, and minimise libraries like os?

Best regards,
Steven.
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment Is My Name And Fostering Self-Responsibility Is My Game.
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: fheroes2 - Scripting Options

Post by Sapient »

StevenAus wrote:Is it a major effort to add a relevant library for a game, remove access to libraries that could be a security risk, and minimise libraries like os?

Best regards,
Steven.
I would say that it is not a major effort for someone who has done it before and knows what they are doing.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Post Reply