InPowerS.Net

 找回密碼
 註冊
搜索
查看: 2763|回復: 7

[轉貼]Advanced World Editting 技術連載

 關閉 [複製鏈接]
發表於 2005-12-26 12:59:23 | 顯示全部樓層 |閱讀模式
轉載自: http://www.myorc.com/
----------------------------------
(I)mod,patch,ums-addon knowledge
WarCraftIII.exe的data載入的pority次序為下:
->UNC Path->*.W3M->War3patch.MPQ->War3.MPQ(HD)->War3.MPQ(CD)其中*.W3M的載入是在game發動後,由玩家自行選擇.
所以MOD Making 會patch個war3patch.mpq
testing會將file以原本個tree,在warcraftiii folder以unc path作存放
advanced editting會將data植入*.w3m


其中mod和testing,如要更改setting,必須restart game;而ums只需reload map.ums被植入mod data後不會影響warcraftiii的version,cd-key,令更多人使用.有部份file data不會被載入執行,包含格式或數值錯誤的data file也一概會被忽略.
其中某些在*.w3m中會的data均有格式,但大家可以用word pad/hex editor去修改.
被植入到*.w3m的files,會被world editor以'saving'的動作意外delete,所以每次*.w3m用world editor(簡稱WE)修改過,均要重新植入data file.
----------------------------------
(II)files extraction
由於*.mpq,*.w3m均是mpq壓縮檔,要用mpq compressor去extract.
mpq2k,
mpqviewer,
techmpq,
winmpq 都可以用.
你可能有需要將updated既storm.dll,ijl15.dll,lmpqapi.dll,StarEdit.exe加入program folder,視乎情況需要而已.
mpqviewer則先extract target mpq file的listfile,載入listfile後再reload target,才能explore target mpq file.
extract後的file才能以word pad,excel,hex editor去開啟.
----------------------------------
(II)files implant(植入)
當你想試驗你所修改過的data,就通常以create的方式,將所有file以原本的樹狀結構加到新的mpq archieve中.
eg.*w3m中,除本身所應該包含的file外,如HumanAbilityStrings.txt要以UnitsHumanAbilityStrings.txt存放.

[ Last edited by Alex2k on 2005-12-26 at 13:17 ]
 樓主| 發表於 2005-12-26 13:01:44 | 顯示全部樓層
更改spell,abilities的方法(引述自war3pub.net)
Custom Files in a map
1) Get WinMPQ - Look in the Tools Thread
2) Get the spell editor if you want
3) The following files affects abilities:
UnitsAbilityData.slk
UnitsHumanAbilityStrings.txt
UnitsHumanAbilityFunc.txt
UnitsOrcAbilityStrings.txt
...all the races have a Func and String.txt Creeps also have them...
4) Extract them all.
5) Try to open the .txt files. It's quite easy to figure out how it works. The tags with prefix B is how it affects targeted units.
Tags with prefix X is how it affects the ground.
6) The .slk file can be modified using the Spell Editor or Microsoft Excel
7) Import the modified files to your map (*.w3m) under the path Units
8) Play your map.
9) Every time you edit your map in WE you must re-import the files to your map.

Converting a unit ability to a hero ability
1) Use the above metod to change the files as necissary (take your time and do nothing wrong)
2) Put the AbilityData.slk into a Folder called Units in your root war3 directory (VERY IMPORTANT)
3) Load the world editor and open your map. Now you can give your hero the abilities under "Hero Abilities".
-------------------------
大家應先以copy&paste的方式去改data,以減少錯誤.
 樓主| 發表於 2005-12-26 13:04:01 | 顯示全部樓層
(II)Extraction/Addition files from *.W3M ,not simple *.MPQ
Format of *.w3m is slightly different from simple *.mpq.
After trying and viewing data in the web,I find that:
Now we only have MPQviewer to extract the file from *.w3m and the MPQ2k to add file to *.w3m.
-------------------------------------
Extraction from W3Ms
Use MPQviewer with storm.dll 1.09(from war3).
Make a text file with the only line"(listfile)".
Use mpqViewer to explore the w3ms with that test file as data.
You will see a '(listfile)'.Extract it and save as a text file.
Use this real listfile to reopen the W3M again.
Choose the file from the viewer that you want and save them.

For protected map,some sort of file are encrypted such as:
listfile,war3map.j,war3map.w3c.war3map.w3r...
I even don't know why war3 exe can read those encryted file while mpqViewer can't.Yet no way to crack it.
-------------------------------------
Adding custom file to W3M
Use MPQ2k in cmd(win2k/winxp) or Dos-prompt(win9x/ME)
MPQ2k need a storm.dll 1.08b(starcraft) & staredit.exe(from patch1.04)
1-Put the target W3Ms,modified files to the MPQ2k folder.
2-In the command prompt,go to the directory of the location of MPQ2k folder.
3-use this command 'mpq2k a <map.w3m> <modified file> <destination pathfile name>'
--'a' is case sensitive.
--<map.w3m> is the map name.
--<modified file> is the file u want to add.
--<destination pathfile name> is the corresponding path if that added file according to the origional war3.mpq.You can extract the listfile from war3.mpq to check the list of file path.
4-eg.
--C:WINDOWS> E: (enter)
--E:> cd warcra~1mapmpq2k (enter)
--E:warcraft iiimapMPQ2k> mpq2k a LT4SpellTest.w3m AbilityData.slk UnitsAbilityData.slk (enter)
5-if the format&path is right, your UMS map will have the effect from the file.
--the following file will not have effect according from web site:
--UnitsAbilityData.slk
--UnitsMiscData.txt
--loading screens' picture
--But i figure out an example that unitsabilitydata.slk have effect!(patch 1.05)
--I was to change the required lv of mirror of blademaster.
-------------------------------------
Notes on Modified W3M
After you use world editor to edit your map and press save,it will remove all any custom file that present abnormally in the W3Ms.
So,Adding custom file to a w3ms should be a last step to make a map unless u want to keep busy/learning.
 樓主| 發表於 2005-12-26 13:06:20 | 顯示全部樓層
(III)Display different of text by trigger/tooltips
The Colour Tag consist of prefix,string,suffix:
|caarrggbbstring|r
aa--alpha(opaque/transparent);
rr--red;
gg--green;
bb--blue;
string--text to change colour;

Semitransparent red 'text1''text2' will be:
|c7fff0000text1|rtext2

|c00FFFF00 Ending: |r =Yellow
|cff32cd32 Ending: |r =Green
|cFF7777CD Ending: |r =Violet
|c55111100 Ending: |r =Black
|c00111100 Ending: |r =Light Blue
|c00777700 Ending: |r =Dark Go

Program help to mix colour is Wc3colour.exe
 樓主| 發表於 2005-12-26 13:07:40 | 顯示全部樓層
(IV)Protecting for you own map
工具:extprotect v0.1.0.4b
下載位址:http://extprotect.psychosanity.com/
方法:step1-extract到一任意folder(1x .exe,2x .txt,total file=3)
------step2-執行ExtProtect.exe
------step3-第一欄是將要做protect既w3ms
------第二,三欄是optional既.有password就會加入大概12%大既backup入w3ms.
------這樣下次用extProtect,輸入password就可還原.
------無password既w3ms,以後world editor同mpqviewer都read唔到,但玩custom game卻可以!
------step4-第四欄是另存新檔的檔名.
------建議:不應與beta map名相同,此為ums map製造中最後一步,protected的ums如果無backup以後神仙無得救,無得再改.
----------------------------------
其實只有listfile,war3map.j(trigger),war3map.w3c(camera),war3map.w3r(region) read唔到,units以下既spell,strings,function都可以'偷'.你可以implant這些worldeditor讀唔到既file,等worldedit開到個map,但全部trigger用關既都會無得睇.
 樓主| 發表於 2005-12-26 13:09:35 | 顯示全部樓層
(v)Basic on the W3Ms and the popular MOD file to be added.
A--w3m file list:
(listfile)
(signature)
(attributes)
war3map.j................TRIGGER-script
war3map.w3e...........MAP-tilesets 地圖的樣貌
war3map.w3i.............INFO-地圖的描述
war3map.w3r.............REGION-trigger用既'地區'位置
war3map.w3c.............CAMERA-螢光幕的不同角度設定
war3map.w3u.............UNIT-兵種設定
war3map.w3s..............SOUND-音效檔案指標/path
war3map.wtg...............STRING-trigger標題
war3map.wct................CUSTOM-custom text<->trigger convert
war3map.wts................STRING-trigger string字串
war3map.shd................MAP-shadow影子
war3mapMap.blp...........MINIMAP-小地圖
war3map.mmp...............PREVIEW
war3mapPreview.tga.....Pathing?
war3mapPath.tga..........Pathing?
war3map.wpm...............PATHING-地形
war3map.doo.................DOODAD-tree
war3mapUnits.doo.........DOODAD-item&such
war3map.imp..................FILE LIST-imported file 先會有這個list
----------------------------------
B--spell setting:
unitsAbilityData.slk;.............use spell editor/excel
unitsHumanAbilityFunc.txt;...use note pad
unitsHumanAbilityStrings.txt;..use note pad
unitsitem....
units
etural...
unitsorc....
units
ightelf....

total 11 files
----------------------------------
C--spell/ability animations:
eg:
AbilitiesSpellsHumanInnerFireInnerFireTarget.mdl;
etc..
so *.mdl is for spell and ability.
----------------------------------
D--units model and textures:
eg:
TexturesWyvernRider.blp;
UnitsCreepsAssassinAssassin.mdx;
UnitsCreepsAssassinAssassin.blp;
DoodadsAshenvalePlantsAshenBush0AshenBush0.mdx;
etc..
so *.blp is textures, *.mdx is model.
----------------------------------
E--command button texture:
eg:
ReplaceableTexturesCommandButtonsBTNAltarOfDarkness.blp;
etc..
----------------------------------
F--player colour:
ReplaceableTexturesTeamColor*.blp;
----------------------------------
add mod前最好先睇睇個war3.mpq,唔係會團團轉.
 樓主| 發表於 2005-12-26 13:15:07 | 顯示全部樓層
(vi)copying resources from dota 2.6
(1)先講抄不到的
a--trigger;camera data;location data 因為encrypt佐.
b--無限射程既'bone spirite'之類既spell 因為用trigger來執行.
c--custom named model(mdx);texture(blp);amination(mdl) 因為你無個list,所以extract唔到同唔知.
(2)抄到的呢?
-extract first-
use your listfile from war3.mpq
use mpqviewer to load dota.w3m
因為listfile被author encrypted.
-spell data-
abilitydata.slk;????abilityfunc.txt;????abilitystrings.txt.
裡面有origional,又有custom既spell,所以淨抄custom既.
每個spell都有unique既tag,format: [Xxxx]
只要你在????abilitystrings.txt見到想抄既spell,睇佢個段spell data第一句就有[Xxxx].之後在????abilityfunc.txt和abilitydata.slk之中search,就可以找到全部各個片段.
我建議你開一個以spell name命名的文字檔,將三段data抄入去,留給將來自己用.
-eg-
假如我在humanabilityfunc.txt找到:fire elemental
// Summon Fire Elemental
[AUfe]
Art=ReplaceableTexturesCommandButtonsBTNRobeOfTheMagi.blp
Researchart=ReplaceableTexturesCommandButtonsBTNRobeOfTheMagi.blp
Buttonpos=1,2
Researchbuttonpos=1,0
Order=fireelemental

[AUfe] is the tag.Search [AUfe] in HumanAbilityStrings.txt;AbilityData.slk ,you will find:
// Summon Fire Elemental
[AUfe]
Name=Summon Fire Elemental
Tip=Summon |cffffcc00F|rire Elemental - [|cffffcc00Level 1|r],Summon |cffffcc00F|rire Elemental - [|cffffcc00Level 2|r],Summon |cffffcc00F|rire Elemental - [|cffffcc00Level 3|r]
Ubertip="Summons a 300 hit point fire elemental to attack the Flame Lord's enemies. |nLasts <AUfe,Dur1> seconds. |n|n|cffffcc00Attacks land units.|r","Summons a 500 hit point fire elemental to attack the Flame Lord's enemies. |nLasts <AUfe,Dur1> seconds. |n|n|cffffcc00Attacks land units.|r","Summons a 700 hit point fire elemental to attack the Flame Lord's enemies. |nLasts <AUfe,Dur1> seconds. |n|n|cffffcc00Attacks land units.|r"
ResearchUberTip="Summons a fire elemental to attack the Flame Lord's enemies. |nLasts <AUfe,Dur1> seconds. |n|n|cffffcc00Attacks land units.|r |n|n|cffffcc00Level 1|r - 300 hit points, light damage. |n|cffffcc00Level 2|r - 500 hit points, moderate damage. |n|cffffcc00Level 3|r - 700 hit points, heavy damage."
Hotkey=F
Researchtip="Learn Summon |cffffcc00F|rire Elemental - [|cffffcc00Level %d|r]"
Researchhotkey=F

AND
C;Y418;X1;K"AUfe"
C;X2;K"AHwe"
C;X3;K"AUfe"
C;X4;K"Flame Lord - Summon Fire Elemental"
C;X5;K1
C;X6;K1
C;X7;K0
C;X8;K"hero"
C;X9;K1
C;X10;K3
C;X11;K1
C;X12;K"_"
C;X13;K0
C;X14;K75
C;X15;K75
C;X16;K20
C;X17;K100
C;X18;K"-"
C;X19;K"-"
C;X20;K"hwat"
C;X21;K"-"
C;X22;K"-"
C;X23;K"-"
C;X25;K"-"
C;X26;K75
C;X27;K75
C;X28;K20
C;X29;K100
C;X30;K"-"
C;X31;K"-"
C;X32;K"hwt2"
C;X33;K"-"
C;X34;K"-"
C;X35;K"-"
C;X37;K"-"
C;X38;K75
C;X39;K75
C;X40;K20
C;X41;K100
C;X42;K"-"
C;X43;K"-"
C;X44;K"hwt3"
C;X45;K"-"
C;X46;K"-"
C;X47;K"-"
C;X50;K"-";EIF(ISNUMBER(RC[-37]),IF(ISNUMBER(RC[-25])<>ISNUMBER(RC[-13]),"@","-"),"-")
C;X51;K"-";EIF(ISNUMBER(RC[-37]),IF(ISNUMBER(RC[-25])<>ISNUMBER(RC[-13]),"@","-"),"-")
C;X52;K"-";EIF(ISNUMBER(RC[-37]),IF(ISNUMBER(RC[-25])<>ISNUMBER(RC[-13]),"@","-"),"-")
C;X53;K"-";EIF(ISNUMBER(RC[-37]),IF(ISNUMBER(RC[-25])<>ISNUMBER(RC[-13]),"@","-"),"-")
C;X54;K"-";EIF(ISNUMBER(RC[-37]),IF(ISNUMBER(RC[-25])<>ISNUMBER(RC[-13]),"@","-"),"-")
C;X55;K"-";EIF(ISNUMBER(RC[-37]),IF(ISNUMBER(RC[-25])<>ISNUMBER(RC[-13]),"@","-"),"-")
C;X56;K"-";EIF(ISNUMBER(RC[-37]),IF(ISNUMBER(RC[-25])<>ISNUMBER(RC[-13]),"@","-"),"-")

全部copy到一個新文字檔,作為'教學資料'
-mdx,mdl,blp-
如果spell之中用了custom mdx,mdl,blp ,你就可以用其中提及的pathfile,加入listfile,就可以找到,通常你crack佐3粒鍾就可以睇完這麼多行...
good things from dota
有個model+texture係名叫kimahri.你詁係什麼unit來?
final fantasy x 個藍色虎型人,主角的同伴!
 樓主| 發表於 2005-12-26 13:21:11 | 顯示全部樓層
(V)傳送hero到下一塊map
轉貼並修改自: http://www.wc3modforge.com/

---Tutorial for the Game Cache---
It is possible to save a hero in memory (eg lvl8, 35142 pt of EXP) and reload it for mission.
Then, let us start!


---Create/Define a game cache---
<trigger editor>
{EVENT}=any
{CONDITION}=any/nil
{ACTION}=Game Cache - Create Game Cache
{VAR1}=name (eg. Test Cache.w3v)


---Write units to the game cache in memory---
{ACTION}=Game Cache - Store Unit
{UNIT}=variable(unit type) / direct to a unit
{LABEL}=name for this 'data' in the cache
{CATEGORY}=folder hold the label for classification
{Last created game cache}=leave it or set to the cache name


---Write the game cache to hard disk---
{ACTION}=Game Cache - Save Game Cache
{Last created game cache}=leave it or set to the cache name


---Read the unit stored in the Cache---
{ACTION}=Game Cache - restore unit facing angle/point
{LABEL}=use defined in precondition
{CATEGORY}=use defined in precondition
{PLAYER}=any
{facing}=any


---To link up maps between them---
To connect charts between them, sometimes a problem.
{ACTION}=Game - Set Next Level
{VAR1}=any map.w3m
{requirement}=Game - Victory AND in single player mode


So far variable type for caching:
Unit,Real,Integer,Boolean

Application:
Password,Kills,Gold,RPG hero,experience,Quest flag,Difficulty......
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

小黑屋|Archiver|手機版|InPowerS.Net

GMT+8, 2025-5-20 22:32

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回復 返回頂部 返回列表