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!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Mordred

Pages: [1]
1
Modelling and Animation / [RELEASE] Easy Loginscreen
« on: December 05, 2014, 06:14:12 pm »
Long time no see everyone,

as some of you might know I was working on a completely new version of my "How to Loginscreen".
This one is made from scratch and compared to my old one, the old one is pretty much complete garbage.
In the end I didn't want to release it because I had no example loginscreen, but as I gave it to some that asked I decided to fuck it and just release it without example.

So... here we go:

----------------------------------------------
1.: What's new?
Beginner:
2.: The files
3.: The Tool
4.: Getting the hang of it
Advanced:
5.: How to add it to your own files?
6.: How to use them?
7.: How to edit the Buttons?
-
8.: Credits

----------------------------------------------

1.: What's new?

  • Only 1 file that has the code in it
  • A ton of improvements code wise
  • You can 'copy' a camera of a model to the one you want to display
  • Should work with every resolution possible now
  • Enhanced API that allows you to make scene scripts that allow you to move models or do different animations
  • A tool that makes creating your own loginscreen a cake walk



BEGINNER SECTION:

2.: The files

Loginscreen with XML extensions - the classic one
Newbie repack with tool - a repack that works by just extract inside wow folder and go

Loginscreen only - only has the loginscreen file in it, for projects that already did changes to xml files
LoginscreenTool only - only the LoginscreenTool file, to just add it if you already have a loginscreen

3.: The Tool



The tool does everything you would normaly have to do by hand with trial and error inside the LoginScene.lua file,
by itself, with almost no effort.

To enable the tool for your loginscreen download either the "Newbie repack with tool" which you only have to extract inside your wow directory and give it a go,
or get the "LoginscreenTool only" file, which only has the loginscreen tool in it.

If you got the "LoginscreenTool only" download, you have to open "AccountLogin.xml" and go to the end of the file,
and add:

Code: [Select]
<Script file="LSTool.lua"/>below the other Script file.

If you have finished your loginscreen with the tool and want to disable it, you have to open "AccountLogin.xml" and go to the end of the file,
and then delete the line you added before.

4.: Getting the hand of it

After you downloaded the files (look 2.) you need to unpack them into your WoW directory (where your WoW.exe is)

If you click the "allFiles.exe" it should look like this:


Now you can open the "LoginScene.lua"-file inside the Interface/GlueXML folder.

On line 57 - 71 is everything you need to look at for editing, if you are not familiar with the Lua language, as SceneScripts can get overwhelming.
inside the sceneData table you find the general settings for your scene:
1: Time in seconds until the next scene get's triggered
2: path to the background image
change them as you need them.

After the sceneData table you find all the models for all your scenes with their settings:
1: sceneID - the model will only show on this specific sceneID
2 - 7: position, rotation, scale and alpha of the model
(Z and Scale look like they both do the same, but Z actually pushes the model further back, if you push it too far back it will vanish because it's out of render distance)
8: the Light of the model, pretty advanced, look at the light documentation inside the LoginScene.lua file, if you want to use the default light just leave it blank with "_"
9: sequence - this is the animation the model will do (may have to play around to find the right one)
10 - 11: width and height Squish - those are also used for scaling, as scaling the model itself will not scale the particles, so sometimes you have to use these two for scaling
12: the path to the model, the model needs hardcoded textures, as you can't apply skins with a method
13: referenceID - this ID doesn't need to be set unless you want to do SceneScripts (can also be left black with "_" if you want to use a cameraModel)
14: cameraModel - this one is a path too like <12>, but this model will only get used for copying it's camera

if you want to add another model to the same scene just make sure the sceneID is the same.
!! add a comma to the end of all models except the last one like this :
Code: [Select]
{1, 0, 0, 0, 0, 1, 1, _, 1, 1, 1, "World\Scale\HumanMaleScale.mdx"},
{1, 0, 0, 0, 0, 1, 1, _, 1, 1, 1, "World\Scale\HumanMaleScale.mdx"},
{1, 0, 0, 0, 0, 1, 1, _, 1, 1, 1, "World\Scale\HumanMaleScale.mdx"}
The same goes for scenes !!


ADVANCED SECTION:

5.: How to add it to your own files?
You only need the "Loginscreen only" download to implement it!


<AccountLogin.xml> changes:

line 93:
Code: [Select]
<ModelFFX name="AccountLogin" toplevel="true" parent="GlueParent" setAllPoints="true" enableKeyboard="true" hidden="true" fogNear="0" fogFar="1200" glow="0.08">to
Code: [Select]
<Frame name="AccountLogin" toplevel="true" parent="GlueParent" setAllPoints="true" enableKeyboard="true" frameStrata="HIGH" hidden="true">line 2501 - 2502:
Code: [Select]
</Scripts>
<FogColor r="0.25" g="0.06" b="0.015"/>
</ModelFFX>
to
Code: [Select]
<OnUpdate>
LoginScreen_OnUpdate(self, elapsed);
</OnUpdate>
</Scripts>
</Frame>
at the end of the file above "</UI>" and beneath "</Frame>" add:
Code: [Select]
<Script file="LoginScene.lua"/>
<AccountLogin.lua> changes:

delete line 29 - 38:
Code: [Select]
self:SetCamera(0);
self:SetSequence(0);

if (IsStreamingTrial()) then
AccountLoginCinematicsButton:Disable();
AccountLogin:SetModel("Interface\Glues\Models\UI_MainMenu\UI_MainMenu.m2");
else
AccountLogin:SetModel("Interface\Glues\Models\UI_MainMenu_Northrend\UI_MainMenu_Northrend.m2");
end
delete line 41 - 43:
Code: [Select]
self:SetSequence(0);
PlayGlueMusic(CurrentGlueMusic);
PlayGlueAmbience(GlueAmbienceTracks["DARKPORTAL"], 4.0);

6.: How to use them?

Now you have everything set up, but how do you use it you might ask.
This time around I made a whole documentary inside the LoginScene.lua file, that has everything that you need to know about what to do.
You can also find it HERE.


7.: How to edit the Buttons?

To edit the buttons you can get the 3 needed .blp files from this path:
Code: [Select]
Interface/GLUES/COMMON/inside the locale-enGB.MPQ or your localization you are useing.
you need to get these three files:
Code: [Select]
Glue-Panel-Button-Up-Blue.blp
Glue-Panel-Button-Down-Blue.blp
Glue-Panel-Button-Highlight-Blue.blp
Now you can convert them and edit them as you want.
Make sure you change the alpha-channel to your new button styles.


8.: Credits:
   Soldan - helping me with all the model work
   Chase - finding a method to copy cameras on the fly
   Stoneharry - bringing me to the conclusion that blizzard frames are never fullscreen, so it works now with every resolution
   Blizzard - for making it almost impossible to make it work properly


~Mordred

2
Tutorials / [TUTORIAL] [ArcEmu] Extended MoveMaps
« on: May 27, 2012, 02:40:34 pm »
Hey Modcraft,

once again a tutorial for ArcEmu :p

Today I wanna show you, how to activate and create movemaps, and also what you can do with movemaps.


Tools

At first you need the tools to extract the maps:
LINK

Now you have the
ad.exe - for creating maps and the
MoveMapGen.exe - for creating the movemaps out of your maps


Creating and Activating

At first we have to activate the mmaps in your core source:
- Go to your ArcEmu Source folder
- Now go to your directory srcarcemu-world  and find the file stdafx.h
- Open it and remove the double slash:
PICTURE

Now that you have enabled the movemaps your NPCs cannot move until you have the mmaps files in your core directory.

So we now extract the map files just like always (or use the already generated ones)

if you want to extract only the maps for your own map you have to edit your patch-xxXX-3.MPQ in your language folder in your data folder. Extract the Map.dbc and delete all the entrys except the ones you want to create maps from and put the dbc back in (save your patch-xxXX-3.MPQ file before you do that! Or just name it patch-xxXX-4.MPQ) and put the MPQ file in your language folder.

When we have the maps folder we create a mmaps folder in the same directory.
After that we start the MoveMapGen.exe and let the movemaps generate.
When it's done we just need to put the maps and mmaps folders in our core folders and recompile our edited core.


Extended use of MoveMaps

Now to the more interessting part of this tutorial.
In this tutorial I use the example of a city.

In a city we want NPCs walk on the street without creating a site of waypoints.
With movemaps it's not hard at all.
All we have to do is, create two versions of the map:
- one for the player which looks just normal
- and another one for NPCs, in which we set walls around the streets so they can't walk through them and from this 2nd map we generate our movemaps from:


~Mordred

3
Serverside Modding / [RELEASE] [Lua] [ArcEmu] Item.dbc creator
« on: May 13, 2012, 03:42:18 pm »
Hey Modcraft community ;)

recently I came across the bug with custom created weapons and armor, that they aren't real weapons / armors and that you have to enter the data of each item into the item.dbc.

So I created this little script to create an Item.txt which you can rename to Item.dbc.csv to convert it to a dbc with DBCUtil.

In this download link is everything you need to use it.
LINK

PS.: LSL2 is used in this script, for more information check out the documentary: LINK

How to:
-extract the downloaded .rar file into your scripts folder in your core directory
-restart/run your core and login
-ingame you have to say .idbc
-if everything worked this message should pop up in your chat:
Your Item.txt has been successfully created.
-go to your core directory (not to your scripts folder) and rename the Item.txt file to Item.dbc.csv
-now drag & drop the Item.dbc.csv file on the DBCUtil.exe and your Item.dbc should be created with every single item you have in your DB

~Mordred
(thx to Kenuvis & Memento for LSL2 :P)

4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!DON'T USE THIS ANYMORE!! THERE IS A NEW VERSION OF THE LOGINSCREEN!!!
Here is the link: Easy Loginscreen

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Hey guys!

today I wanna show you how to make a Login screen by only editing the Glue Lua and XML files.

all you need for this tutorial you can find in this link:
filebeam
file-upload


Code: [Select]
1. Setting up your WoW
2. Customize your Loginscreen
2.1 Background
2.2 Music
2.3.1 Buttons
2.3.2 Positions
3. Add M2 models
4. Example


---------------------------------------------------------------------------------------------------




1. Setting up your WoW

At first extract the .rar file in your WoW-directory.
Congrats! First step done!






2. Customize your Loginscreen

2.1 Background

To set the background you just have to create a 1024x1024 .png file
which will have to be at least 75% of the 1024 pixels (768px height) to fill the entire screen.

Once you have finished editing your file save it in your directory:
WoWInterfaceLoginScreen

and name it:
Background.png

Now all you have to do is drag and drop the .png file onto your BLP Converter
and remove the .png file out of the directory.



2.2 Music

To set your background music all you have to do is find your music you like
and put it into the directory under:
WoWInterfaceLoginMusic

and name it:
LoginScreen.wav

After doing that open your music file with any musicplayer
and write down the length of the song (IN SECOUNDS!!!)
eg.: 2:25 -> 145

Now open the vx_vars_init.lua
(WoWInterfaceGlueXML)
press CTRL + F and search for:
VX_MUSICTIMER = GetTime() + <SECOUNDS>;

and remove the <SECOUNDS> with your song lenght.




2.3.1 Buttons

For the Buttons you have to create 5 files:

Code: [Select]
Glues-BigButton-Up   -> the normal button
Glues-BigButton-Down   -> the button pressed
Glues-BigButton-Highlight   -> the button while your mouse is over it
Glues-BigButton-Glow   -> the glow around the button
Glues-BigButton-Rays   -> the pulsing rays when your mouse is over it

You have to save these files as .png files in your directory:
WoWInterfaceGLUESCOMMON

with the names above and then just drag and drop then onto your BLP Converter.
Now remove the .png files out of your directory and your done.




2.3.2 Positions

Now to set up the positions of your buttons you have to open the AccountLogin.XML
in your directory:
WoWInterfaceGlueXML

Press CTRL + F to search for:

Code: [Select]
name="AccountLoginAccountEdit"          -> editbox for entering your accountname
name="AccountLoginPasswordEdit"         -> editbox for entering your password
name="AccountLoginLoginButton"          -> Login button
name="AccountLoginExitButton"           -> Quit button
name="OptionsButton"                    -> Options button
name="AccountLoginManageAccountButton"  -> Manage Account button
name="AccountLoginCommunityButton"      -> Official Site button
name="AccountLoginSaveAccountNameText"  -> Save Account name checkbox text + checkbox

Now to move these you have to look out for these eg.:

Code: [Select]
<Anchor point="BOTTOM">
       <Offset>
       <AbsDimension x="..." y="..."/>
       </Offset>
</Anchor>


with the Anchor point you can set the anchor to a specific destination
eg.: "TOP"  ;  "BOTTOMLEFT"  ;  "RIGHT";  "CENTER"  ;  ...

and with the AbsDimension x and y you can set the x & y - coords from this destination.






3. Add M2 models

At first open your vx_vars_init.lua...

The lines 4 - 9 lines are the definitions of the model.
The model gets added to the Modelframe at the last 3 lines.

In these lines you can change the lines 5 - 9 with the description behind
(SetHeight and SetWidth only if you want to stretch your model, or cut of a piece of the model)

If you want more than one model on your loginscreen, you have to copy the lines 4 - 9 and change every Mod1 in your copied block to Mod2 (if more than two then Mod3, ...)
also you have to add a new "table.insert" behind (with a space and ; between) or under the first "table.insert"
in there you have to write: table.insert(M , Mod<YOUR MODEL NUMBER!>);
eg.: table.insert(M, Mod2);
if you don't add the model to the table "M", the model will reset it's position on logout and returning to the AccountLogin screen.

Now to set the model you have to start your WoWModelViewer and find a model with only 1 skin (else they are white)
then enter your full path of the model into the 2nd last line with double \ and .m2 at the end


PS.: try to set the position of the model in Z+1, most of the time it helps to see the model.

PPS.: keep in mind that every model has different usage of the SetPosition command
     eg.: some use the x and y axes to move in a 2D field and some use the y and z axes to move in a 2D field






4. Example

Here is an example of how you can make your Loginscreen:
[youtube:3i9ibrmo]http://www.youtube.com/watch?v=PzxRd59HdOQ[/youtube:3i9ibrmo]

PS.: I used "World\Kalimdor\silithus\passivedoodads\ahnqirajglow\quirajglow.m2" to do the light effects.

[youtube:3i9ibrmo]http://www.youtube.com/watch?v=F-YwXsLiRmI[/youtube:3i9ibrmo]

[youtube:3i9ibrmo]http://www.youtube.com/watch?v=10m7XDuaMxI[/youtube:3i9ibrmo]


also you should check out alborq's amazing tool for placing models:

Quote
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: LINK

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

Special thanks to:
vxsw -> GlueXML AShell
(dunno if it's not his, so don't blame me.)
alborq -> for his tool to place 3D models more easily.


~Mordred

5
"Retro-Porting" / [Question] Converting Cata .m2 to Wotlk - problem
« on: March 29, 2012, 05:21:46 pm »
Hey Modcrafters,

I ran into a problem today by converting the Skywall cloud m2 object from Cataclysm to Wotlk.
When I log into WoW after I spawned the object I get the #132 Error...

So I thought it maybe has something to do with the python script:
The m2 has 2 skins and in the script it only loads 1 skin as far as I can read out of:
sname = filename[0:len(filename) -3] + "00.skin"
so I thought I add a sname2 and also a skin2 (I don't think this will work but I just tried xD)
After this I tried it again and converted the m2 object to Wotlk.
Same Error when I logged back in.

Now I'm here to try my luck if someone can explain it to me :)
If someone had the same problem and got around it, any hint would be appreciated!
Or if someone already converted this m2 object to Wotlk it would help me a lot.

~Mordred

Pages: [1]