poVoq Posted December 17, 2012 Report Share Posted December 17, 2012 Hello First of congratulations for the latest release!Anyways... I was wondering if there is an updated scripting reference available for getting into modding the game...So far I only fund the somewhat outdated (?) references on the wiki:http://trac.wildfiregames.com/wiki/Scripter%27s_Referencehttp://trac.wildfiregames.com/wiki/Coding_Conventions#JavaScripthttp://trac.wildfiregames.com/wiki/Modding_Guidehttp://trac.wildfiregames.com/wiki/Mod_LayoutI would really like to look into modding camera and player behavior for a small ARPG mod prototype, however I am really not a coding genius, so I would rather only touch the JavaScript code... so how feasible is that with the current scripting possibilities? Quote Link to comment Share on other sites More sharing options...
feneur Posted December 17, 2012 Report Share Posted December 17, 2012 What do you want to change in terms of camera behaviour? If it's just changing the angle and similar things it can be done in the config files.The player behaviour should be mostly possible to do in JavaScript, it's hard to tell for sure unless you tell us a bit more about what exactly it is that you want to do though Quote Link to comment Share on other sites More sharing options...
poVoq Posted December 17, 2012 Author Report Share Posted December 17, 2012 (edited) Well, basically it would need a fixed camera, zoomed in and always following the player as well as player controls that can be triggered by hotkeys and mouse clicks. Just imagine playing Diablo in the 0AD engine and you got the basic idea.Loot and inventory system would have to follow later... would be great if that was possible with scripts too, I gathered already that the GUI is easily scriptable, so from that side there should be no major barriers I guess.Edit: Well the overall idea is to get a somewhat playable prototype for this idea ( http://www.wildfiregames.com/forum/index.php?showtopic=16308 ) to maybe attract a more skilled coder, so that I can focus on the graphic side of things. Besides I need to refresh my JS coding (non-)skills and have some time to kill over the holidays Edited December 17, 2012 by poVoq Quote Link to comment Share on other sites More sharing options...
leper Posted December 18, 2012 Report Share Posted December 18, 2012 For the fixed camera you could just set the navigation hotkeys to nothing (I'm not sure if that works, but it should). (Specified in default.cfg though you should put that in a local.cfg or when it is supported in a mod.cfg) (hotkey.camera.*)Have you tried the follow camera hotkey? (hotkey.camera.follow (default is F))You should take a look at setCameraFollow() in gui/session/input.js, which is used by the follow camera hotkey handler.I don't see anything preventing loot and inventories from being script-only. Quote Link to comment Share on other sites More sharing options...
poVoq Posted December 18, 2012 Author Report Share Posted December 18, 2012 Ahh that sounds promising! I also read that hero units are in the game now (my internet is somewhat slow, so I am still on alpha 11)? Do they already have some sort of item inventory and special abilities?So far I didn't have a look at the code itself, but I might find the time tonight. I will keep you updated on any progress I make (no promises on anything). Quote Link to comment Share on other sites More sharing options...
leper Posted December 18, 2012 Report Share Posted December 18, 2012 Do they already have some sort of item inventory and special abilities?No. Quote Link to comment Share on other sites More sharing options...
poVoq Posted December 19, 2012 Author Report Share Posted December 19, 2012 Ahh your tips about the local.config were right on spot, just by playing around with it I got the basic behavior and view already (if you press F in game to have the camera follow the unit selected). A mod.cfg would be indeed nice to have, I assume it is on the road map?Out commenting or removing the hotkey settings doesn't seem to work though, as it then seems to fall back on the ones from the default.cfg. Even setting them all to one button doesn't seem to work... maybe that is a "bug" that you can't actually remove controls in the local.cfg?Also the main mouse buttons seem to be hard-coded, e.g. not adjustable by the config file? Switching to left_mouse button for selection and attacking would be nice, but there doesn't seem to be an option in the config file.Next I will have a look at the actual code Thanks again for the hints. Quote Link to comment Share on other sites More sharing options...
leper Posted December 19, 2012 Report Share Posted December 19, 2012 Setting hotkeys in local.cfg afaik just adds them to those specified in default.cfg, so you'd need to change that. But I think that adding another config setting to disable some movements would be better.Regarding the mouse buttons: Yes they are hard coded, check gui/session/input.js and look for SDL_BUTTON_LEFT and SDL_BUTTON_RIGHT. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted December 26, 2012 Report Share Posted December 26, 2012 So far I only fund the somewhat outdated (?) references on the wiki:http://trac.wildfiregames.com/wiki/Scripter%27s_ReferenceThis is the only outdated link of the ones you posted Probably the first and most important part of an RPG mod would be having a single playable character and locking camera / movement onto them. Quote Link to comment Share on other sites More sharing options...
Kimball Posted December 26, 2012 Report Share Posted December 26, 2012 Slightly off topic: Speaking of mods, when will we be able to recognize new mod folders without the command line? (i.e. not "public" or "internal") I believe the original intent was to include a UI window that allowed players to enable/disable certain mods and list priority in case there were duplicate files. Is this in the queue somewhere? Quote Link to comment Share on other sites More sharing options...
Pureon Posted December 27, 2012 Report Share Posted December 27, 2012 Is this in the queue somewhere?It is in the queue (staff only link). See row 24. Quote Link to comment Share on other sites More sharing options...
Kimball Posted December 27, 2012 Report Share Posted December 27, 2012 So I know the colors are based on the vote average cutoffs, but do they indicate priority as well? (i.e. the likelihood something will be implemented) Quote Link to comment Share on other sites More sharing options...
Pureon Posted December 27, 2012 Report Share Posted December 27, 2012 So I know the colors are based on the vote average cutoffs, but do they indicate priority as well? (i.e. the likelihood something will be implemented)Yes, however probably best to continue the discussion in that topic, otherwise we'll go far off-topic here Quote Link to comment Share on other sites More sharing options...
poVoq Posted December 27, 2012 Author Report Share Posted December 27, 2012 This is the only outdated link of the ones you posted Probably the first and most important part of an RPG mod would be having a single playable character and locking camera / movement onto them.Yeah, but that one also seems the most relevant, doesn't it?Anyways... what you mention is 95% possible with just modifying the config.cfg which I have done already. However this currently only works if one would fork 0 A.D. as it's own code base, as (like written above) there is no dedicated mod.cfg yet, and the local.cfg does only overwrite and not replace the default.config.Would be great if those issues could be addressed, as I assume this could be relevant to a variety of potential mods. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.