This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TUTORIAL]How to create a Loginscreen with Lua & XML editing  (Read 59353 times)

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #75 on: February 19, 2013, 04:06:09 pm »
Quote from: "hyakkimaru"
Duplication is not a problem, the real problem is my memory... x)

I don't remember how to hardcode a texture ^^'
... Most likely within the .m2 ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

hyakkimaru

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 128
    • View Profile
    • http://mc-revolution.fr
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #76 on: February 19, 2013, 04:14:10 pm »
... I'm so stupid >< !

Edit : so so so... It doesn't work :(
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #77 on: February 20, 2013, 12:39:23 am »
1, copy and rename the m2 and the fitting texture blps.
2. change m2 name and blp name with hex inside the m2.
3. convert edit and reconvert the textures.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

Grianar

  • Contributors
  • Race Changer
  • *****
  • Posts: 25
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #78 on: February 20, 2013, 07:18:24 am »
Very nice.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

hyakkimaru

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 128
    • View Profile
    • http://mc-revolution.fr
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #79 on: February 20, 2013, 01:08:48 pm »
After a lot of tears my problem is solved, sorry for the flood, I'll post a render later :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

hyakkimaru

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 128
    • View Profile
    • http://mc-revolution.fr
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #80 on: February 21, 2013, 08:16:00 pm »
It's me again...

My question is : Can I create a theme changer ?

For example: I hate human, but, the loginscreen is based on humans kingdoms, is it possible to create a menu which allow to change the loginscreen ?

I hate human, one click and... I've a loginscreen for dwarves :D !

I don't know if it's possible, I haven't skills for that but I ask :D
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Mordred

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 57
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #81 on: February 22, 2013, 01:08:46 am »
Quote from: "hyakkimaru"
It's me again...

My question is : Can I create a theme changer ?

For example: I hate human, but, the loginscreen is based on humans kingdoms, is it possible to create a menu which allow to change the loginscreen ?

I hate human, one click and... I've a loginscreen for dwarves :D !

I don't know if it's possible, I haven't skills for that but I ask :D


yes you can, you also can make a random loginscreen so everytime you open WoW it has a different loginscreen.
it's just a bit of Lua code in AccountLogin.lua and a few things in AccountLogin.xml and it should work

I'm actually trying to rebuild the GlueXML folder, so it looks more like a game
also full keyboard control for people who like to do things fast.

my AccountLogin files have half the lines than the original ones, without the unnecessary crap
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Burn in fire of righteousness!
Easy Loginscreen

Allifeur

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 189
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #82 on: February 22, 2013, 05:19:26 pm »
(What music did you use in the third loginscreen?  :o  )
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Mordred

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 57
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #83 on: February 23, 2013, 01:45:22 am »
it wasn't the real music, but I added it to have at least some music
also the song title was: Kevin McLeod - The Cannery
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Burn in fire of righteousness!
Easy Loginscreen

alborq

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #84 on: March 04, 2013, 07:55:23 pm »
Hello,First of all I thank yours has to be Mordred fantastic job.From my side I studied a little code, then I develop a small application to simplify the placement of 3D model that can happen complicate

So I develop a small application that is used to position the models

Insights api: http://imageshack.us/photo/my-images/83 ... 94612.jpg/


Little tutorial:
1) Set the path to your model in the EditBox
2) Click on Add
3) If you do not see your model then increase the size as needed, so you will be close to or one is your model (off-screen)
4) Change the position with XYZ button
5) change the scale with two button above to be more precise
6) meet the position indicate on a notepad
/!  They are not kept for the next time!
7) Completer position in the configuration file:
    Mod1: SetPosition (pos_x, pos_y, pos_z);
    Mod1: SetModelScale (scale);
    Mod1: SetFacing (facing);

8) Enjoy

Download link: http://depositfiles.com/files/x085iqjpw


Bonjour,
tout d'abord je tien a remercier Mordred pour sont travail fantastique.
De mon coté j'ai étudié un petit peu son code, par la suite  j'ai développez une petite application pour simplifier le placement des model 3D qui peut s'averez compliquez

J'ai donc développez une petit application qui sert a position le models

Aperçus de l'api : http://imageshack.us/photo/my-images/83 ... 94612.jpg/


Petit tuto :
1) Mettre le chemin de votre model dans l'EditBox
2) Cliquez sur Add
3) Si vous ne voyez pas votre model alors augmentez la taille autant que nécessaire, vous serez donc un peut près ou est votre model (hors de l'écran)
4) Modifier la position avec les bouton  XYZ
5) modifier l'echelle avec les deux plus haut bouton pour etre plus précis
6) relever les position indiquez sur un bloc note
/!!! elle ne sont pas conservé pour la prochaine fois !

7) Completer les position dans le fichier de configuration :
   Mod1:SetPosition(pos_x, pos_y, pos_z);
   Mod1:SetModelScale(scale);
   Mod1:SetFacing(facing);

8) Enjoy

Lien de téléchargement : http://depositfiles.com/files/x085iqjpw
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

osler

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #85 on: March 04, 2013, 08:03:02 pm »
Alborq, thats impressive!
I´ll try right now
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Mordred

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 57
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #86 on: March 04, 2013, 09:02:03 pm »
Awesome work alborq, if you want I can add the english part to the first post

also these are the first works on the new GlueDialog files (still WIP with a lot of bugs):
LINK
LINK

the parts around the box in the middle are spinning and fly in when they get called.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Burn in fire of righteousness!
Easy Loginscreen

alborq

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #87 on: March 05, 2013, 12:12:55 am »
I'm OK !  

and i thinks we must explain how create a background picture in HD 16:9 but actualy, a render is soo flat..
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Mordred

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 57
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #88 on: March 05, 2013, 05:17:20 am »
it's added :)

also for HD background just make an image that's 2^X size in both dimensions
for example:
1024x1024 = 2^10 x 2^10

if you want to make a background with higher resolution just make one with:
2^11 x 2^11 which will be: 2048x2048

keep in mind that this will take 4 times the file size of the lower resolution background,
so it's good to compress the blp file.
if your converter can't do that, use THIS, save as BLP2 and use the DXTC compression.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Burn in fire of righteousness!
Easy Loginscreen

alborq

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TUTORIAL]How to create a Loginscreen with Lua & XML edi
« Reply #89 on: March 05, 2013, 11:59:36 am »
Hi, i come back for ask a little question, actually we can move Model only with Facing, we have a control on only one axis, i need move 2 other axis of model , but i dont know how, all doc dont say anything about that, i thinks we must move a CameraPosition but :

Model:SetCameraDistance() - This function is not yet documented
Model:SetCameraFacing() - This function is not yet documented
Model:SetCameraPosition() - This function is not yet documented
Model:SetCameraTarget() - This function is not yet documented
Model:SetCustomCamera() - This function is not yet documented

i have try this Mod2:SetCameraPosition(mt_pos_x, mt_pos_y, mt_pos_z);
but i have an error :attempt to call method "SetCameraPosition" (a nil value)
i must understand this fonction has been removed ?

we cant move other axe ?



Facing = Y rotate
???? =  X rotate
???? =  Z rotate
« Last Edit: January 01, 1970, 01:00:00 am by Admin »