Author Topic: More modable stuff  (Read 1124 times)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
More modable stuff
« on: 3 November 2011, 06:14:43 »
I just made changes in svn that allow the intro and menus (And startup + menu music and models etc) to be totally modded without having to touch the main MG data. Basically nearly anything that can go into the data folder can be overriden (menu files, intro text and music etc). Also new language files can be added after release using this same mechanism. IT would be possible using a number of features now to have the same binary running vanilla MG and custom Mod's.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: More modable stuff
« Reply #1 on: 3 November 2011, 20:46:09 »
Sounds pretty cool. Could you explain more about how it is done (for modders wishing to use this feature)?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: More modable stuff
« Reply #2 on: 3 November 2011, 21:06:31 »
it's in the language-files

Code: [Select]
;-------------------------------- Intro Text Start
IntroText1=Based on award-winning classic Glest
IntroStartMilliseconds1=2000
IntroText2=the MegaGlest Team presents
IntroStartMilliseconds2=8000
IntroText3=a libre software real-time strategy game
IntroStartMilliseconds3=16000
IntroTexture4=$APPLICATIONDATAPATH/data/core/menu/textures/logo.tga
IntroTextureWidth4=256
IntroTextureHeight4=128
IntroStartMilliseconds4=24000
IntroText5=$GAMEVERSION
IntroTextX5=+5
IntroTextY5=-45
IntroTextFontType5=menunormal
IntroStartMilliseconds5=24000
IntroText6=www.megaglest.org
IntroStartMilliseconds6=30000
IntroModelStartMilliseconds=36000
IntroTextureStartMilliseconds=38000
;-------------------------------- Intro Text End

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: More modable stuff
« Reply #3 on: 3 November 2011, 22:41:30 »
it's in the language-files

Code: [Select]
;-------------------------------- Intro Text Start
IntroText1=Based on award-winning classic Glest
IntroStartMilliseconds1=2000
IntroText2=the MegaGlest Team presents
IntroStartMilliseconds2=8000
IntroText3=a libre software real-time strategy game
IntroStartMilliseconds3=16000
IntroTexture4=$APPLICATIONDATAPATH/data/core/menu/textures/logo.tga
IntroTextureWidth4=256
IntroTextureHeight4=128
IntroStartMilliseconds4=24000
IntroText5=$GAMEVERSION
IntroTextX5=+5
IntroTextY5=-45
IntroTextFontType5=menunormal
IntroStartMilliseconds5=24000
IntroText6=www.megaglest.org
IntroStartMilliseconds6=30000
IntroModelStartMilliseconds=36000
IntroTextureStartMilliseconds=38000
;-------------------------------- Intro Text End
Oh, wasn't thinking. It's kinda limited, at the same time, though, since users would have to change their language to see these custom things (which could also hurt internationalization). I think there was a past suggestion a long time ago for a "mod selector" for overhaul mods, which would allow the user to select the configuration from some type of menu, and then the game would use these changed core files or something, but dunno what happened to the suggestion, and haven't a clue how it would be done. This is better than before (except for internationalization), though.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: More modable stuff
« Reply #4 on: 16 December 2011, 01:16:47 »
Bumping this topic, as the wiki has a mention of this feature (and the associated XML tags) on the XML/Menu page, but doesn't explain them at all, nor should we assume that anything is necessarily apparent to readers. For example, the wiki has the XML tag <show-time value="1500"/>. Obviously the value is a length of something in milliseconds, but what? This could be said for many of the new XML and language file tags. Simply giving a short description on what exactly they modify by editing the page would aid modders in tweaking such values (it may seem plain as day to those who programmed the feature, but not necessarily for the casual translator just looking for the right value to modify so their's enough time to read the text.
« Last Edit: 18 June 2016, 13:19:17 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: More modable stuff
« Reply #5 on: 16 December 2011, 03:36:49 »
Thanks for bumping, loads of docs coming, just finishing up packing mg for debian, thats has consumed an inordinate amount of time!

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: More modable stuff
« Reply #6 on: 6 January 2012, 00:25:08 »
FYI I did document the intro stuff on wikia, hopefully its detailed enough.