• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] 5 Race in WarCraft

Status
Not open for further replies.
Level 3
Joined
Aug 10, 2004
Messages
59
5 Race in WarCraft

I want to put more than 4 races in warcraft.

First I looked for some information about races in World Edit:

In UI\WorldEditStrings.txt I found this:

Near begin of file is this:

WESTRING_RACE_HUMAN=Human
WESTRING_RACE_ORC=Orc
WESTRING_RACE_UNDEAD=Undead
WESTRING_RACE_NIGHTELF=Night Elf
WESTRING_RACE_NEUTRAL=Neutral
WESTRING_RACE_NEUTRAL_NAGA=Neutral - Naga
WESTRING_RACE_OTHER=Special
WESTRING_RACE_SELECTABLE=Selectable


In the middle of file there is this:

WESTRING_UE_UNITRACE_HUMAN=WESTRING_RACE_HUMAN
WESTRING_UE_UNITRACE_ORC=WESTRING_RACE_ORC
WESTRING_UE_UNITRACE_UNDEAD=WESTRING_RACE_UNDEAD
WESTRING_UE_UNITRACE_NIGHTELF=WESTRING_RACE_NIGHTELF
WESTRING_UE_UNITRACE_DEMON=Demon
WESTRING_UE_UNITRACE_CREEPS=Creep
WESTRING_UE_UNITRACE_CRITTERS=Critter
WESTRING_UE_UNITRACE_OTHER=Other
WESTRING_UE_UNITRACE_COMMONER=Commoner
WESTRING_UE_UNITRACE_NAGA=Naga
WESTRING_UE_UNITRACE_UNKNOWN=None


Few lines later there is this:

// Trigger races
WESTRING_TRIGRACE_HUMAN="Human"
WESTRING_TRIGRACE_ORC="Orc"
WESTRING_TRIGRACE_UNDEAD="Undead"
WESTRING_TRIGRACE_NIGHTELF="Night Elf"
WESTRING_TRIGRACE_DEMON="Demon"


Demons, Naga and Other are only in WE, and Creep and Critter are not playable, you can’t chose races in RaceMenu before game.

In UI\FrameDef\GlobalStrings.fdf I looked for races in WarCraft (not WE)

I found those string:

COLON_ORC "Orc:",
ORC "Orc",
COLON_HUMAN "Human:",
HUMAN "Human",
COLON_UNDEAD "Undead:",
UNDEAD "Undead",
COLON_NIGHT_ELF "Night Elf:",
NIGHT_ELF "Night Elf",
COLON_RACE "Race:",
COLON_RANDOM_RACES "Random Races:",


There wasn`t Demons and Naga, but in file Scripts\common.j I found this:

constant race RACE_HUMAN = ConvertRace(1)
constant race RACE_ORC = ConvertRace(2)
constant race RACE_UNDEAD = ConvertRace(3)
constant race RACE_NIGHTELF = ConvertRace(4)
constant race RACE_DEMON = ConvertRace(5)
constant race RACE_OTHER = ConvertRace(7)


(look on numbers attributed to Demon and Other race, there is 5 and 7, what about 6?)
and this:

constant racepreference RACE_PREF_HUMAN = ConvertRacePref(1)
constant racepreference RACE_PREF_ORC = ConvertRacePref(2)
constant racepreference RACE_PREF_NIGHTELF = ConvertRacePref(4)
constant racepreference RACE_PREF_UNDEAD = ConvertRacePref(8)
constant racepreference RACE_PREF_DEMON = ConvertRacePref(16)
constant racepreference RACE_PREF_RANDOM = ConvertRacePref(32)
constant racepreference RACE_PREF_USER_SELECTABLE = ConvertRacePref(64)


As you see there is Demon race.

After that I thought it might be possible to add Demon race to warcraft.

In file UI\FrameDef\Glue\PlayerSlot.fdf I found this:

Frame "POPUPMENU" "RaceMenu" INHERITS WITHCHILDREN "PlayerSlotPopupMenu" {
Width 0.08,
UseActiveContext,
SetPoint LEFT, "NameMenu", RIGHT, 0.0, 0.0,

PopupMenuFrame "RacePopupMenuMenu",
Frame "MENU" "RacePopupMenuMenu" INHERITS WITHCHILDREN "StandardPopupMenuMenuTemplate" {
UseActiveContext,

MenuItem "RANDOM", -2,
MenuItem "HUMAN", -2,
MenuItem "ORC", -2,
MenuItem "UNDEAD", -2,
MenuItem "NIGHT_ELF", -2,
}
}


When I added DEMON I could see this:

5race.jpg

http://republika.pl/mjhal_web/5race.jpg

But I couldn’t choose Night Elf Race.

I edited those files:

UI\GlobalStrings.fdf

I`ve added here this:

COLON_NIGHT_DEMON "DEMON:",
NIGHT_DEMON "DEMON",


And in UI\SkinMetaData.slk I added this:

f333 DEMON Profile FrameDef -1 FrameDefDefault string 1 1 1 299 1 0
f334 COLON_DEMON Profile FrameDef -1 FrameDefDefault string 1 1 1 299 1 0


But it still didn`t work.

I have installed AMAI, in Scripts\common.ai I found this:

constant integer R_RANDOM = 0
constant integer R_ELF = 1
constant integer R_HUMAN = 2
constant integer R_ORC = 3
constant integer R_UNDEAD = 4
constant integer R_NEUTRAL = 5
constant integer RACE_NUMBER = 4


I haven`t seen in normal Scripts\common.ai nothing about RACE_NUMBER
I’ve copied to original Scripts\common.ai this:
constant integer RACE_NUMBER = 5


One day, when I Edited file Scripts\blizzard.j and I make some mistakes saw that I cant choose any race, maybe in this is something important what I should change too add Demon race

After editing Scripts\blizzard.j I saw this:

5raceb.jpg

http://republika.pl/mjhal_web/5raceb.jpg


It still didn`t work.

Now I thing that I need to look for some function with decide what happen when you press a name of race before game starts.

I`ve looked to almost all files in warcraft MPQ archives, and here is list of file with I couldn’t check:

War3.exe
World Editor.exe
WorldEdit.exe
Reverb3.flt
Mssfast.m3d
Msseax2.m3d
Mssdolby.m3d
Mss32.dll
Mp3dec.asi
ijl15.dll
Frozen Throne.exe
Game.dll
blizzard.ax
(attributes)


I thing it is all.

Soon I will check what will happen if I remove one Race, and when I will add new race to AMAI

PLZ help! How to add demon race!

Sorry for all mistakes :)

EDIT: I am still loking for the answer for my problem
 
Level 3
Joined
Aug 10, 2004
Messages
59
No, you don’t understand me, file was good, but I’ve made there a mistake and it didn’t work. In file script\blizzard.j is something important, what I should change to add new race.
 
Level 3
Joined
Aug 10, 2004
Messages
59
Again me :)
I've just checked what will happen if I remove one race from frame in file: In file UI\FrameDef\Glue\PlayerSlot.fdf But nothing special haven't happen.
Now I don't have any idea how to add new race to warcraft.
Help!
 
Status
Not open for further replies.
Top