Modding => Modding Questions => Topic started by: Stereox on November 19, 2016, 08:14:11 am
Title: Basic Question about Modding
Post by: Stereox on November 19, 2016, 08:14:11 am
Hi guys, i'm new here. Can't find any better place to ask stuffs about modding TL2 but here.
I'm not that new to modding, i've tried Wc3 WorldEdit, TES CreationKit, Terraria, and now TL2. I just get the original game so i can access the GUTS (and support the dev :D)
I'm currently want to port Path of Exile items into TL2. Currently doing the Amulets. Maybe some of you know this game.
And because the lack of detailed documentation, i just rely on trials and errors this past week. Here's some question :
1. How can i import icons ? And what is the image's specification ? I tried converting random icon into DDS and it doesn't show up on GUTS
2. (Path of Exile reference) I want to recreate Eye of Chayula, and if someone doesn't know , it's an Amulet. Unique amulet to be more specific. It has these affixes:
+10-16 to All Attributes ( i can add manually from STR, DEX, MAG, and DEF effects) +30% Increased Rarity of Item Found (basic IIR from Effects) 20% Reduced Maximum Life (-20% hp) Cannot be Stunned (100% stun resist)
the problem is, how can i make the Effect of Stun Resist says "Cannot be Stunned" instead of "100% Stun Resistance" in the item itself ? I tried to make custom Effect from EFFECTLIST.dat with base effect of Stun Resistance and modify the GOODDES and BADDES into string. It can be compiled. But crashes when i run the game.
[EFFECT] <STRING>EFFECT:KEFFECT_TYPE_STUN_RESISTANCE <STRING>NAME:XUNIQUES_CHAYULA_STUNRESIST <TRANSLATE>GOODDES:Cannot be Stunned <TRANSLATE>GOODDESOT:Cannot be Stunned for [DURATION] <TRANSLATE>BADDES:Cannot be Stunned <TRANSLATE>BADDESOT:Cannot be Stunned for [DURATION] <INTEGER>MINVAL:-100 <INTEGER>MAXVAL:100 <STRING>VALUE1:MIN <STRING>VALUE2:MAX <STRING>VALUE3:NA <STRING>VALUE4:NA <STRING>VALUE5:NA <STRING>TYPE:Value <INTEGER>DISPLAYPRECISION:0 <FLOAT>DISPLAYPRECISIONMAXVAL:0 <BOOL>AFFIX_MODIFIES:true [/EFFECT]
3. How do i set the item drop rate ? There's rarity field in the Item editor. But i don't know the standard of these drops. Because i want to make it extra rare.
That's my few questions. I really appreciate any kind of answers. For those interested in this items, you can visit http://poedb.tw/us/unique.php?cn=Amulet (http://poedb.tw/us/unique.php?cn=Amulet). It has so much game's database we can port into TL2 because why not.
I can only visit here weekends so i may not respond quickly
Thanks :)
Title: Re: Basic Question about Modding
Post by: Kva3imoda on November 19, 2016, 02:13:22 pm
1. Well, this process is a little confusing. :) For mod you need 2 files: *YOUICONSHEET*.DDS and *YOUICONSHEET*.IMAGESET Also you need *YOUICONSHEET*.PNG for GUTS - because GUTS "does not see" *.dds. You can delete all *.png later.
*YOUICONSHEET*.DDS(or PNG) - your texture with icons *YOUICONSHEET*.IMAGESET - description of your texture, that stores names and coordinates of your icons. You can open it with any text editor.
<?xml version="1.0" encoding="UTF-8"?> <Imageset Name= "fish" Imagefile="media/ui/icons/fish/fish.png" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" > <Image Name="fish_undead" XPos="1" YPos="1" Width="62" Height="62" /> <Image Name="fish_sushi" XPos="65" YPos="1" Width="62" Height="62" /> <Image Name="fish_spine" XPos="129" YPos="1" Width="62" Height="62" /> </Imageset> Your texture you can create manually in GIMP/Photoshop/Paint.NET (as I do) and create *YOUICONSHEET*.IMAGESET manually too. Or you can find TextureSheeter.exe utility in your game directory. This utility allows you to automate the whole process.
Put your icons in one directory, choose paths, placing checkmarks and push Go.
For me, this utility can`t convert to DDS(Use DXT5 for Icons and UI) so I chose PNG.
Title: Re: Basic Question about Modding
Post by: Phanjam on November 19, 2016, 09:37:53 pm
Hey StereoX, hey Kva! Just to add about those files...
As Kva pointed out, the iconsheet and .imageset files are always in pairs. The .imageset sets the X (horizontal moving right) and Y (vertical moving down) coordinates for sections on the iconsheet containing an image and gives that section a unique name which the game can then call to display the image.
Starting a file-pair from scratch can be troublesome getting the X,Y coordinates just right, so Kva's suggestion to use texturesheeter.exe to make these file-pairs is right. But in case you wanna try a manual approach you can also "clone" a file-pair to use as a base.
Taking note of the "grid" used by the .DDS / .PNG file, overlay your own images on top of the ones already there. This ensures your X and Y coordinates will match-up correctly with what's on the .imageset file. Save the edited file under a totally new name.
On the cloned .imageset, rename those sections which now contain your new images...
To: <Image Name="new_image_name" XPos="129" YPos="1" Width="62" Height="62" />
It's a good idea to erase the other X/Y lines so as not to confuse the game. Point the .imageset to use your newly edited image (the opening lines at the top of the file) and save the edited .imageset also under a totally new file name. Your file-pair should be good to go ;)
The icons for armor and weapon units are usually called from within their unit .DAT files (in MEDIA\UNITS\...) with a line like
<STRING>ICON:icon_name_from_imageset_file
Just edit these to use your new image names. Other unit types might vary slightly from this, but shouldn't be difficult to figure out.
Title: Re: Basic Question about Modding
Post by: Stereox on November 19, 2016, 09:54:25 pm
Thank you guys. I'll try that TextureSheeter :)
How about the other question ?
Title: Re: Basic Question about Modding
Post by: Phanjam on November 20, 2016, 12:25:54 am
I just spent some time trying to "hide" the affix descriptions for item units (using <BOOL>STATSHIDDEN:TRUE), so you might use alternate text (using <TRANSLATE>ADDITIONALDESCRIPTION:) to describe them instead. But I couldn't get it to work :(
That was the only workaround I could think of / sorry. Tho there may be others...
Oh and Welcome to Torchmodders StereoX!!!
Title: Re: Basic Question about Modding
Post by: Stereox on November 21, 2016, 12:24:50 am
Thank you anyway. I'll try to figure it out by myself this time
Title: Re: Basic Question about Modding
Post by: Kva3imoda on November 21, 2016, 05:05:32 pm
3. How do i set the item drop rate ? There's rarity field in the Item editor. But i don't know the standard of these drops. Because i want to make it extra rare.
The Item Drop is complex structure of spawn classes. But for your goal is enough to set RARITY. If your amulet is a unique item, then RARITY:100 means the drop rate as an ordinary unique item. RARITY:50 means - less than 2 times. RARITY:0 means - never.
Title: Re: Basic Question about Modding
Post by: Stereox on November 23, 2016, 01:08:37 am
So i've tried modifying spawn classes which is quite structured I'm expecting conflicts with other mods
But can i DIRECTLY copy "Treasure_*" spawn classes and use it in my mod ? Is there any rule before i copy spawnclasses or any modifyable .dat in vanilla TL2 ?
I've set it to highly improbable chance to drop
Title: Re: Basic Question about Modding
Post by: Phanjam on November 24, 2016, 12:41:18 am
Hey Stereox! Not really a direct answer but Im hoping this will help you...
So i've tried modifying spawn classes which is quite structured I'm expecting conflicts with other mods
But can i DIRECTLY copy "Treasure_*" spawn classes and use it in my mod ? Is there any rule before i copy spawnclasses or any modifyable .dat in vanilla TL2 ?
I've set it to highly improbable chance to drop
For spawnclasses you can copy the file, change the file name, but keep the name string the same in order to merge the two files. Doing this will add all of the information from the new file into the base TL2 file.
So, if the first spawnclass has a list of possibilities that looks like:
Quote
axes swords maces
And you want to include spears, too, then you'd copy the first file, change its filename, add spears and delete the other entries:
Quote
axes swords maces spears
When the mod is compiled it will add spears to the list.
Title: Re: Basic Question about Modding
Post by: Kva3imoda on November 24, 2016, 04:44:58 pm
Hey gytfunke! :) You're back!
Spawn classes - is a complex structure, now (and before my "modding break") I studied this.
Stereox, you can test all spawn classes in GUTS. In SpawnClass Editor click on the "check mark" button and you'll get a new window for tests.
Title: Re: Basic Question about Modding
Post by: Stereox on November 24, 2016, 06:47:12 pm
Got the spawn classes stuffs. It worked. The weight stuffs is quite complicated as each "possible" drop aside from NONE will "multiply" the possibility of drops.
And now again, i created a skill. Actually just rename a skill from TL1CP.
Alchemist Ember Lightning renamed to Arc. I add some two more chains to the skill's executable and adjust the damage. (no new affixes or anything, just renamed)
And now the skill icon disappear on the Skill Menu. I figure it out that renaming the Alchemist's tree UI and rename the Ember Lightning at Alchemist's base data fixes this. The thing is, whenever i hover above the icon, it Crashes.
Here's the UI code:
I'm sorry for this discussion is getting long :(
Title: Re: Basic Question about Modding
Post by: Stereox on November 24, 2016, 06:47:36 pm
Here's the EMBERLIGHTNING.dat:
Please take your time to review the code. Maybe i'm too careless because i usually add the code manually and use Replace All thingy from Notepad.
Thank you very much guys
Title: Re: Basic Question about Modding
Post by: Kva3imoda on November 24, 2016, 08:04:49 pm
You can open any UI menus in GUTS.
Title: Re: Basic Question about Modding
Post by: Kva3imoda on November 24, 2016, 08:12:37 pm
And now the skill icon disappear on the Skill Menu. I figure it out that renaming the Alchemist's tree UI and rename the Ember Lightning at Alchemist's base data fixes this. The thing is, whenever i hover above the icon, it Crashes.
You're right, the new skill data has to be entered into the skilltree UI. It's best to make a new SKILLTREEOVERRIDE file (by cloning and renaming the existing Alch file for example) for this.
Quote from: Stereox
Here's the UI code: . . .
But you won't need to do this by hand! :D It's best to do this from the "UI" view in GUTS. Switch to the UI tab (in the lower left of the GUTS main window) and then open up your cloned/renamed SKILLTREEOVERRIDE file.
It will be easier to make a tutorial using screenshots / I will do this later tonight (sorry for delay :P )
Quote from: Stereox
I'm sorry for this discussion is getting long :(
Ha! This is definitely NOT long yet :D
Title: Re: Basic Question about Modding
Post by: Stereox on November 25, 2016, 01:45:50 am
You're right, the new skill data has to be entered into the skilltree UI. It's best to make a new SKILLTREEOVERRIDE file (by cloning and renaming the existing Alch file for example) for this.
That's the problem. I don't understand with those many names and variables. So i just rename one thing there, on that section.
Quote
Ha! This is definitely NOT long yet :D
Maybe it's true. I might pissed everyone of you here
Quote
...and don't forget to change the GUID too!
How does one change the GUID and which one am i supposed to change this GUID ?
Title: Re: Skill Icons
Post by: lolesch on November 25, 2016, 08:37:31 pm
Hey Stereox (and welcome to the family...)
I am willing to write a tutorial (http://torchmodders.com/wiki/doku.php?id=icons) about Icons for the TorchmoddersWiki (http://torchmodders.com/wiki/doku.php), including ImageSetCreation, simple Icon replacement and some advanced stuff like your Skill changes... The thing is, this will take some time so here is my quick reply:
Icon:
Copy an ImageSet.png and replace the Icons with your own
Save it in your Mod into the equal folder level as the original in the "Media/..." folder under a new name (likewise you give all your files a personal prefix - for example: "stx_skillicons.png" -> will make them unique and won't be replaced by other mods)
Save it again as .dds
copy the .IMAGESET, rename and relocate it, rename (and resize/locate if necessary) all Icons you want to use and delete all text lines you dont use (or delete the "<" and keep the lines for later replacements)
Save it with the same new name you used for the .png and .dds
Skill:
Clone a skill you want to modify by right clicking that skill in the SkillsEditor
the popup window contains the new name (remember the prefix thing?), the folder you save in (should be media/skills/...) and the location of the skill you wanna clone (checkbox should be activated ;))
in the bottom right window search for the "Name", write it down (later I come back to that) and change it to "prefix_whatever", change the displayname to "whatever"
change the "image" and "inactiveimage" links by browsing for your ImageSet
just for knowledge - you can set a "global" skill icon or different icons for each level
Let's make it work
Player:
in GUTS navigate to DataEditors/Units/Players and select the _Base of the class you want to give the skill to
select the "skills" menu at the right and click on "new"
brows four your newly created skill and set the requirements
now save it and your class has "learned" that skill
UI:
Click on "UI" in the Guts main window at the very bottom left
Above click on "file" and open the Skilltreeoverride of that class located here MEDIA\UI\MENUS\SKILLTREEOVERRIDES
expand the "skillWindow" till you find "SkillPane 1-3". In these 3 windows search for the Skill you cloned (the written down name might help you to find it) and select it
on the right side in Guts main window make sure to select "Properties" and search under "Data" for "WIDGET NAME"
delete the old and insert your skills "name" (the one with the prefix), no drop-down-list to choose from :(
done! At least thats all I can think of. let me know if it's working or if I have to go over my steps again to check what I've missed...
for example you might need to save you progress in between and restart GUTS from time to time...
cheerio lolesch
p.S.: using this should have no GUID conflict. else you can find "GUID to clipboard" under "Utilities" in the Mainwindow and paste it into your new skill. Its the ID of code elements and must be unique - I guess your skill uses the same as the "vanilla" skill. This happens when you copy paste code manually but not when its done like "cloning" with GUTS
Title: Re: Skill Icons
Post by: Stereox on November 26, 2016, 09:16:27 am
this is it. I thought widget name is yet another String names which i can fill in freely because there's no field for "Skill Used: " or "Skill Linked: "
Bit misleading.
Title: Re: Skill Icons
Post by: Phanjam on November 26, 2016, 10:59:26 pm
Click on "UI" in the Guts main window at the very bottom left
Above click on "file" and open the Skilltreeoverride of that class located here MEDIA\UI\MENUS\SKILLTREEOVERRIDES
expand the "skillWindow" till you find "SkillPane 1-3". In these 3 windows search for the Skill you cloned (the written down name might help you to find it) and select it
on the right side in Guts main window make sure to select "Properties" and search under "Data" for "WIDGET NAME"
delete the old and insert your skills "name" (the one with the prefix), no drop-down-list to choose from :(
Hey guys, here's a pic to help "zoom-in" on Lolesch's tut about the skilltreeoverride file in the UI tab of GUTS...
Hope this helps ;)
Title: Re: Basic Question about Modding
Post by: lolesch on November 27, 2016, 07:45:40 am
thanks Phanjam.
I've linked my post to the Wiki, hope this will do for the moment. Can you remember any other questions about Images that should be answered there too? Else I will fill in some more detail for deeper understanding and thats it, no?
Title: Re: Basic Question about Modding
Post by: Phanjam on November 27, 2016, 03:24:04 pm
Cant think of any right this moment, but im sure something will pop up ;) Thanks so much for wanting to make a tut Lolesch!
Title: Re: Basic Question about Modding
Post by: Stereox on November 28, 2016, 01:51:30 am
Thank you guys I'm done with this issues.
So next issue is..
I'm about to create skill. Let say it's called "Eruption". It's just another Geyser based skill.
But this time, it only sprouts fires(recolored Geyser burst) from the ground Targetting random location.
I place the tier0-1 spawn location at Axis angle (90,180,270,360) and it worked fine. They spawn as i draw on the Editor.
But when it comes to angle (45,135,225,315) the fires spawn randomly. I just copy pasted the spawner, and it should do the job. But there's the problem.
I'm sorry if it's hard to comprehend. My english sucks.
TL:DR
How to place spawner in a desired location ?
Title: Re: Basic Question about Modding
Post by: Phanjam on November 28, 2016, 06:42:35 am
Hi Stereox! Are the right number spawning in the wrong locations, or not enough of them are spawning?
Title: Re: Basic Question about Modding
Post by: gytfunke on November 28, 2016, 07:59:39 am
Hi Stereox,
It would be much easier to know what's going on if you were to link us the files you're working with.
You could copy and paste the text from the skill.dat, or you could take a screenshot of the Properties window when you have the damage shape selected.
Title: Re: Basic Question about Modding
Post by: Stereox on December 01, 2016, 12:13:36 am
So i create this little collection of ported item from other game. So many property/affixes i cannot recreate because lack of knowledge.
But now it cannot run for unknown reason. Maybe because i mess the Effects.dat But if anyone has spare time, you can look at it.
I haven't looked at your mod, but I do not think you can create new effects to be used by affixes/skills. I remember trying this a long time ago and messing with the Effects.dat file breaks the mod. Could be wrong, but I think that is a dead end unfortunately.
Title: Re: Basic Question about Modding
Post by: Stereox on December 14, 2016, 08:43:05 pm
I don't understand the logic of that issue
I just copy an effect and paste it with different name with same type. It should works IMO I'm bit disappointed with this minimal documentation. And quite messed editor (too many same variable with no difference in their names)
Maybe i'm just bit too early in this modding and need more practice :)
Title: Re: Basic Question about Modding
Post by: RnF on December 14, 2016, 08:47:32 pm
I just copy an effect and paste it with different name with same type. It should works IMO I'm bit disappointed with this minimal documentation. And quite messed editor (too many same variable with no difference in their names)
Maybe i'm just bit too early in this modding and need more practice :)
I am with you on the logic, it should work. But there are ALOT of things like that with GUTS. It is a great tool, but it can be rather limited on random things. Some of these issues are probably over-sites, some are probably on purpose so Runic can protect their IP.
Title: Re: Basic Question about Modding
Post by: gytfunke on December 17, 2016, 08:23:45 pm
It makes sense that you can't add Effects. Each Effect is a reference to a class (or function, if you will) in the code. To add a new Effect, you'd have to write a new class into the code, which we can't do in GUTS.
We can add entries to other .dat files because they reference arrays, which are lists of entries (like items or skills). The number of entries in an array is unimportant, so adding to them works.
And RnF's right that we probably can't modify existing Effects because that functionality wasn't included in GUTS.