Reverie World Studios Forums

Reverie World Studios Forums (http://www.reverieworld.com/forums/index.php)
-   Scenario Design and Modding (http://www.reverieworld.com/forums/forumdisplay.php?f=34)
-   -   Questions about the modding (http://www.reverieworld.com/forums/showthread.php?t=4013)

nestharus 09-21-2011 11:01 PM

Questions about the modding
 
1. Is there an API available anywhere for the Lua? I'm talking about stuff like the player objects and what not.


2. It seems a little unclear as to the multiplayer capabilities of the modding. Would it, for example, be possible to do things like current warcraft 3 maps? Furthermore, in multiplayer custom maps, is it possible to move from one map to another (load up maps) while keeping the games sync'd?

Is it possible to have local player data, similar to the GetLocalPlayer function in wc3?


What I saw was that games were up to 8 players. I'm mostly interested in making some ORPGs for Dawn of Fantasy =).


Is the Lua IO library open or is it locked down? Some maps may become dangerous with the IO library open, so this is why I ask this question.


Is there a way to interact with online databases like MySQL? I ask this because there is stuff for MySQL for Lua.

Is the Lua stuff that is packed with the game just the standard distribution?


That's all for now, tx =).

nestharus 09-23-2011 10:15 AM

Ok, so it's been like 2 days now with no answers ;o.

I need to know this stuff before buying the game. Me buying the game depends on the answers to these questions ; ).

andreicde 09-23-2011 10:17 AM

probably since they are busy polishing the game as much as possible before release. after all,the game gets released in 7 days

Konstantin Fomenko 09-23-2011 10:41 AM

Ah moving this post to the scenario design forum:)

To start things of DoF feaures a powerful scenario editor - where you can code any sort of scripting in Lua. Shortly after release we are also adding a "module" modding capability - for these wishing to take things further and perhaps create a brand new game using DoF engine.

Quote:

1. Is there an API available anywhere for the Lua? I'm talking about stuff like the player objects and what not.
Yes, we will need to release some documentation for advances stuff like unit coding, changing gameplay mechanics e.t.c

Quote:

2. It seems a little unclear as to the multiplayer capabilities of the modding. Would it, for example, be possible to do things like current warcraft 3 maps? Furthermore, in multiplayer custom maps, is it possible to move from one map to another (load up maps) while keeping the games sync'd?
This is possible without any modding just by using scenario editor. However - it would take us few more weeks before we add multiplayer support for fan made scenarios.


Quote:

Is it possible to have local player data, similar to the GetLocalPlayer function in wc3?
Yap.

What I saw was that games were up to 8 players. I'm mostly interested in making some ORPGs for Dawn of Fantasy =).


Quote:

Is the Lua IO library open or is it locked down? Some maps may become dangerous with the IO library open, so this is why I ask this question.
All the default game files are locked up. But if you are creating a new "module" for the game - you`ll be able to unlock all the files.


Is there a way to interact with online databases like MySQL? I ask this because there is stuff for MySQL for Lua.

Is the Lua stuff that is packed with the game just the standard distribution?

Andy Joslin 09-23-2011 11:34 AM

Quote:

Originally Posted by nestharus (Post 59564)
Is the Lua IO library open or is it locked down? Some maps may become dangerous with the IO library open, so this is why I ask this question.

Much of it will be closed.


Quote:

Is there a way to interact with online databases like MySQL? I ask this because there is stuff for MySQL for Lua.
The DB functions at the moment save to a local database for each player. We will probably keep these and have the local DB reset after each scenario.

Quote:

Is the Lua stuff that is packed with the game just the standard distribution?
It is our own version.

nestharus 09-24-2011 03:14 AM

Well, one big thing in wc3 dev is save/load. Blizzard addressed this in Starcraft 2 by adding banks. How do you plan to support persistent data? I believe that the best way to support this would be through an online database. While Blizzard's design of banks might have seemed smart in Starcraft 2, it keeps data local to a given computer, meaning that a person can't load up their data on another machine (for example, a laptop while traveling).


Furthermore, do you have any map protecting procedures planned? If the maps are plainly open, then anyone can steal anyone else's map. Another issue would be cheating. Furthermore, if you had games that supported persistent data like an ORPG, then cheating would be quite an issue. In warcraft 3, there are many ORPG maps that are modified so that players can get cheated characters.


Otherwise it is sounding like this game is showing a lot of promise for modders looking to move on from Warcraft 3 =). All of Starcraft 2's weird gimmicks made a lot of modders not move on from Warcraft 3. I'm sure that if you really make the modding portion of the game something to behold, you'll be able to capture the majority of modders that are on Starcraft 2 and Warcraft 3.


Also, the scripting editor is rather lacking. One good start would be to add a complete list of functions/objects to it. As someone types, the function/object comes up. This is something that was done in JassNewGen Pack for Warcraft 3. This feature can be expanded to include functions/objects coded by a user, not just those that are part of the Lua distribution. It is rather daunting to require someone to memorize an entire API, no? Sure, if you coded long enough in it, you would have the whole thing memorized eventually, but that could take years.


Also, is it possible to have multiple players in the same game on different maps? I noticed that you could add new scenarios or maps or whatever they are called to your project, meaning that one project could contain multiple maps in it. Using this feature, it is possible to create maps for cities, maps for houses, or w/e else. If it was possible for two players to be in the same game and chat to each other and what not while being on different maps, this would mean that indoor areas and dungeon areas would be very conceivable. Furthermore, if it was possibly to actually load up different instances of a map for different players, then that would be even more fantastic as it would offer a way to reuse the same maps for different situations (for example, a player's house or a ship). Really, I think just the idea of instancing maps and sending the players to those instances is much better than just loading up a map for a player =). It allows a lot more things and no current RTS or MMORTS supports this.


Also, will it be possible to change things like unit descriptions (specific to a player) and unit stats in-game? Will it be possible to change a unit's model in-game? One thing that comes up a bit in Warcraft 3 is the idea of morphing or evolving. A lot of the time, this involves just changing the unit model. At other times, this requires "morphing" the unit. Is it possible to "morph" a unit, meaning that a unit is replaced by another unit while retaining its current pointer? Simply replacing a unit with another unit could potentially lose a lot of information (for example, a custom ability may be on that unit; when the unit is simple replaced, the ability is lost). Also, if things are referencing that unit's pointer (yes, I know pointers are in the background in Lua, but referencing a unit still references that pointer since it's a table) and a unit is replaced, then all things referencing that unit will break. Supporting a way to replace a unit with another unit without replacing the actual table would be extremely helpful. This replacement could involve just replacing all of the current unit information with the new unit's information (for example, life). Of course, you would have to be careful of modifications (like upgrades). Yea, morphing is just a pain, but there are plenty of people that like to use it. Warcraft 3 does support this, albeit annoyingly ; P. In it, a user has to use either a special Chaos ability or a special transformation ability, the latter taking advantage of a Warcraft 3 bug


Thank you for moving this thread also.


These are current posting priviledges for the Scenario Design and Modding Forum in case you wondered why I posted this in the Main Square

Quote:

You may not post new threads
You may post replies
You may not post attachments
You may edit your posts

Andy Joslin 09-24-2011 09:16 AM

1. I don't think there will be a way to save persistent data in a custom scenario (in a mod, yes). Could possibly change, but it's doubtful.

2. I don't know about map protection.

3. We do have many improvements planned for the scirpting editor, including at least auto-complete. Right now it is in the same state it was when it was first created.

4. The editor does support more than one map per map. However, each player has to be on the same map at the same time. But, you could still create seperate 'maps' within one map using different ViewTargetBounds for each player (restricts where player can scroll/what is shown on minimap). So when player 1 enters a house just set player's 1's ViewTargetBounds to (houseTopCornerX, houseTopCornerY, houseBottomCornerX, houseBottomCornerY)

5. Unit descriptions: Yes.
Unit models: For now limited yes, but hopefully we will have full unit editing available within the editor later (For mods a full yes, but for scenarios only quite limited at the moment)
Morphing: No. But you can easily clone the stats you want then change the pointer where necessary, if you build a robust enough system. Lua is a good language
Eg if you wanted morphing with abilities, you could just add a SwitchOwner function to the ability script.

Morphing is really not that hard if you just build all your systems with it in mind.

nestharus 09-24-2011 12:16 PM

Please elaborate the differences between a module and a scenario-

1. can either be downloaded through the game similar to how Warcraft 3 does hosting? The way Warcraft 3 does the downloading allows for easy distribution of maps, which is one reason why Warcraft 3 has lasted so long. Hardly anyone downloads maps outside of the game. Once maps are required to be downloaded outside of the game, the target audience plummets in size.

2. Estimated file size limits for either? For example, Warcraft 3's file size limit is 8 megabytes.

3. Designing a module vs designing a scenario (very light, for example what editors might be used for the module and what editors might be used for the scenario).


Also, being able to have persistent data is pretty big in the modding communities. Blizzard created the entire bank structure to give you an idea of how much modders like to be able to save persistent data. Without that feature, modders have to make save/load codes, strings that are outputted to a player that contain encrypted compressed information that the player then types into another game.


Also, map protection is an even more major deal to modders. Vexorian's Map Protector for Warcraft 3 is used on just about every single decent map created for Warcraft 3. A big concern of modders is map theft and cheating, hence why modders really want map protection. Yes, open knowledge is good, but it leads to those two serious problems =).


For today's modders, they'd decide between Dawn of Fantasy, Warcraft 3, and Starcraft 2. One of the things that keeps a game like this alive for a very long period of time are modders. By providing better tools, you can ensure a long lifespan of the game.


There are 4 main categories of modders from my experience-
Terrainers
Modelers
Textureres
Coders


There could be composers and voice actors as well, but for a lot of people those two things just aren't worth it.


Of those categories, terrainers, modelers and coders are by far the biggest groups. Furthermore, a lot of modelers and terrainers may not have access to coders, which is why Blizzard has a GUI for scripting. This way a modeler does not have to learn how to program in order to make a quality map =). The majority of maps are created using a GUI. By not providing a GUI, you cut out a very large portion of the modding population. Yes, I'm a coder and never use a GUI, but just about everyone I deal with on 3 major modding sites does use a GUI. Many GUI users also want to be able to use regularly coded systems through a GUI, which is why Blizzard made it possible to, for example, use a Galaxy script through a GUI.


Also, just throwing this out there, but another very popular feature is custom interfaces and floating windows. Custom projectiles (being able to reference those projectiles and what not) as well as being able to reference actual attacks (damage source -> attack, unit) are other very major things. Being able to reference attacks made on a unit as that attack is issued and resolved (including AoE attacks) would be extremely helpful. This was attempted in Warcraft 3 many times, but failed in all cases. I was one of the people who tried to write an Attack Indexer (a way to retrieve and reference attacks).


I mentioned Blizzard a lot because your biggest source of modders will probably be those that are currently modding for Warcraft 3 and or Starcraft 2. Since you already know your audience and know exactly what they want, it is up to you to decide whether you want to provide them with those tools or not =).


Anyways, just things to think about.

Andy Joslin 09-24-2011 01:48 PM

At the moment, the difference between the a mod and a scenario is that a mod can edit..anything in the game. It can create / edit interface files, create/edit units and sounds, etc.

At the moment a scenario cannot have a new unit file or sound file or anything attached to it. However, we really want to add this and our current scenario structure makes adding this not too hard, but other gameplay features are higher priority right now.

So in the future, you will most likely see the ability to easily attach new units or models or sounds or anything to a .dofscn. This will make a scenario nearly the same as a mod.

2. I don't know about file size limits. Definitely won't be very low.


3. Mods? The Dawn of Fantasy is engine is basically just a lua interpreter. Almost everything you see in the game is scripted. This makes modding in dawn of fantasy immensely powerful. You could turn DoF into almost anything you want if you know lua.

4. Persistent data: Well, it is a possibility. But not very likely.

5. Map protection: we share similar thoughts. I was a designer for Starcraft & Age of Empires II for many years before I joined Reverie, and I still fool around with AoE2 a bit. Many of my coworkers are in similar boats.
So put down protection as another 'possibility'. This would be one of the easier features to add.
Since every .dofscn is simply a modified zip archive - try opening any dofscn in WinRAR and look :). This archive layout of scns is why adding attachable unit files or sounds or anything would be not too hard an addition for us. This archive format also lends itself to easy map protection - we would just need to add something very similar to the way WinRAR puts a password on an archive, then add that to the editor.

6. GUI scripting is something we have wanted to add for awhile. But it probably will not happen anytime soon, it is a big project.
However, a modder could easily create a GUI scripting utility for us. Gogo guys ..;)

7. Custom interfaces: A completely custom interface is not possible in a scenario. But it is possible in a mod (since all interface is just a lua script in /Resource/Interface/).
A possibility at a later date, though, is to add some communication functions so that the scenario script could tell the interface what kind of interface to create. A modder could also write this communication and submit it to reverie.

8. Unit events: you will be happy. :) Each unit has an 'event' function each time almost anything happens. Including OnAttackReady, OnAttack, and OnAttackEnd events. There is already functionality for the scenario to use these events. OnAttack and OnAttackEnd tell you the attacker and the target, like you wish, as well. Custom projectiles aren't hard either.

nestharus 09-24-2011 03:00 PM

So, when a unit attacks, you will be able to retrieve an actual attack object?

Unit attacks -> generate attack object




See, what I'm concerned about is being able to retrieve actual attacks like they are objects, both melee and projectiles. For example, the projectile would be the attack object. In melee, the attack object would be who knows what. When a unit ends up being hit, that attack object should be retrievable. Retrieving the attacking unit/attacked unit is semi useless without being able to retrieve the attack object.


Possibilities: chance to hit based on distance of the attack being initiated from the target unit. For example, if target unit is at 300z and the attack took place at 100z as a projectile, the chance to miss might be much higher. This data can't be stored on the attack unless there is an attack object. Just retrieving the attacking unit's coordinates would give inaccurate result as the unit could have moved while the projectile was heading towards the target. Does this make sense now? : )

A lot of people in the Warcraft 3 community have wanted attack indexing for a long time and there is currently no resource that accurately pulls this off in Warcraft 3, making this absolutely impossible to do it in Warcraft 3. I don't know if Starcraft 2 supports this or not. However, if Dawn of Fantasy supported this, custom combat would be incredibly easy to pull off and rather lightweight since it could let the c++ code deal with moving the projectiles or w/e and handle collisions.

Also, it might be very useful to be able to apply a velocity and acceleration to a unit. This would allow for custom projectiles without coding the movement of these projectiles in the Lua, which would allow for more projectiles on the screen at one time. The big bottleneck in custom projectiles on Warcraft 3 is the JASS code required to move them.


All times are GMT -6. The time now is 01:54 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2001-2011 Reverie World Studios INC. All Rights Reserved.