Author Topic: How to make epic/legendary items enchantable?  (Read 635 times)

0 Members and 1 Guest are viewing this topic.

Not Yet Rated!

Offline Carl_Johnson

  • Visitor
  • *
  • Topic Author
  • Posts: 3
  • Country: 00
  • Karma: +0/-0
    • View Profile
    • Awards
  • Time Zone: ?
How to make epic/legendary items enchantable?
« on: 06 February 2020, 03:55:38 »
How to make epic or legendary items enchantable just like in Soulvizier Mod?

Not Yet Rated!

Offline lixiss

  • Member
  • *
  • Posts: 31
  • Country: ru
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: +3
Re: How to make epic/legendary items enchantable?
« Reply #1 on: 06 February 2020, 17:18:46 »
Most easier way is mark them as "rare" item (green item). To keep item name colors, you may rename them by prepending color appropriate tag.

Not Yet Rated!

Offline bernd

  • Member
  • *
  • Posts: 10
  • Country: de
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone:  0
Re: How to make epic/legendary items enchantable?
« Reply #2 on: 05 August 2020, 20:43:26 »
how would one do that?

Not Yet Rated!

Offline lixiss

  • Member
  • *
  • Posts: 31
  • Country: ru
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: +3
Re: How to make epic/legendary items enchantable?
« Reply #3 on: 08 August 2020, 06:26:58 »
how would one do that?

There is two ways nowadays:

1. Download Titan Quest Lost Legacy mod, it solve this task by patching game.dll file. I'm doesn't play too much in this mod, but you generally even doesn't need their mod to play, just only need get patched executable files, and then run them over standard game or whatever mod you like.

2. Absolutely legal way in sense what you not need patch executables: like i'm described above. But without right (development) skills it will be really a painful job. (Unpack database.arz, replace in about 1500 files for TQAE, or more than 5000 files for SV-AERA, then pack this changes back into form of mod or in original database.arz...)

As for (2) i'm already done some good progress in reading and some naive writing of ARZ files, so applying patch like i'm described above (marking epic & legendary items as rare) is tooks few seconds... Actually i'm use this change as some sample. But there is still a lot of work before i'm be able to show tool. And generally it aims only to mod developers with some development skills (or who what to learn a bit).

It will look similar to next code (API is not final and varied):
Code: [Select]
            foreach (var record in database.GetAll())
            {
                if (record.TryGet("itemClassification", out var field))
                {
                    var value = field.Get<string>();

                    if (value == "Epic" || value == "Legendary")
                    {
                        record["itemClassification"] = "Rare";
                        record["--gx-itemClassification"] = value; // keep original value for later use
                    }
                }
            }

 :P


PS: I'm keep aside fact, what applying this kind patch on regular game and then bit of tqvaultae magic - it is another grand easy mode, and generally considered as cheating.

PPS: However i'm might reconsider and start publish less polished version, actually only small part of tool is near to finish (e.g. ARZ file support only). Road map bit bigger. :( However, for me there is case when writing tooling for modding more interesting than attempt to make mod. ;)

PPPS: I'm had similar functionality applied over .dbr files before. It was sucky, it was slow and it was lost on died HDD anyway, so today i have already better thing.
« Last Edit: 08 August 2020, 06:33:05 by lixiss »

Not Yet Rated!

Offline bernd

  • Member
  • *
  • Posts: 10
  • Country: de
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone:  0
Re: How to make epic/legendary items enchantable?
« Reply #4 on: 08 August 2020, 12:27:08 »
how would one do that?

There is two ways nowadays:

1. Download Titan Quest Lost Legacy mod, it solve this task by patching game.dll file. I'm doesn't play too much in this mod, but you generally even doesn't need their mod to play, just only need get patched executable files, and then run them over standard game or whatever mod you like.

2. Absolutely legal way in sense what you not need patch executables: like i'm described above. But without right (development) skills it will be really a painful job. (Unpack database.arz, replace in about 1500 files for TQAE, or more than 5000 files for SV-AERA, then pack this changes back into form of mod or in original database.arz...)

As for (2) i'm already done some good progress in reading and some naive writing of ARZ files, so applying patch like i'm described above (marking epic & legendary items as rare) is tooks few seconds... Actually i'm use this change as some sample. But there is still a lot of work before i'm be able to show tool. And generally it aims only to mod developers with some development skills (or who what to learn a bit).

It will look similar to next code (API is not final and varied):
Code: [Select]
            foreach (var record in database.GetAll())
            {
                if (record.TryGet("itemClassification", out var field))
                {
                    var value = field.Get<string>();

                    if (value == "Epic" || value == "Legendary")
                    {
                        record["itemClassification"] = "Rare";
                        record["--gx-itemClassification"] = value; // keep original value for later use
                    }
                }
            }

 :P


PS: I'm keep aside fact, what applying this kind patch on regular game and then bit of tqvaultae magic - it is another grand easy mode, and generally considered as cheating.

PPS: However i'm might reconsider and start publish less polished version, actually only small part of tool is near to finish (e.g. ARZ file support only). Road map bit bigger. :( However, for me there is case when writing tooling for modding more interesting than attempt to make mod. ;)

PPPS: I'm had similar functionality applied over .dbr files before. It was sucky, it was slow and it was lost on died HDD anyway, so today i have already better thing.


I am mostly asking cause i wann alearn how to edit a mods properties.

like I have downloaded an expx4 mod.

I went into the folder, edited the gameengine.dbr file in both the game folder and the xpack/game folder (putting a constant at the end of the experienceequation) and saved them both.

sadly that didnt do shit in the game and I seriously dont understand why.

there doesnt seem to be any other pklace where I could change exp stuff in that mod folder.

someone said something about a rewards and penalties section but I just dont find it anywhere in that gameengine.dbr.

sadly cant really use art manager in any way given that I messed up the 3 folders it is using, changed them to elsewhere and dont know anymore what the default settings were, so cant get any mods anymore.
but didnt even find dbr files anyways.

so yeah, changing the gameengine files in the mod's folder didnt do anything.

maybe i would need a new databse.arz file as well?

but sadly I cant use art manager anymore (which claimwise can create .arz files) so I cant repack the now edited stuff anymore :-(

I am at a loss what to do.

Why is editing an existing mod so difficult? :-(


Edit:
Quote

                        record["itemClassification"] = "Rare";
                        record["--gx-itemClassification"] = value; // keep original value for later use

Wouldnt it make sense to switch these 2 lines around?
like saving the old value elsewhere before you actually change it?

otherwise the gx-itemClassification will only save them all as "Rare" cause the old values had been already overwritten beforehand.

would jsut be my guess as a programming noob :-)
« Last Edit: 08 August 2020, 12:29:32 by bernd »

Not Yet Rated!

Offline lixiss

  • Member
  • *
  • Posts: 31
  • Country: ru
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: +3
Re: How to make epic/legendary items enchantable?
« Reply #5 on: 08 August 2020, 16:53:11 »
I am mostly asking cause i wann alearn how to edit a mods properties.
like I have downloaded an expx4 mod.
I went into the folder, edited the gameengine.dbr file in both the game folder and the xpack/game folder (putting a constant at the end of the experienceequation) and saved them both.
sadly that didnt do shit in the game and I seriously dont understand why.
...
maybe i would need a new databse.arz file as well?
but sadly I cant use art manager anymore (which claimwise can create .arz files) so I cant repack the now edited stuff anymore :-(
I am at a loss what to do.

I'm not sure what I'm understand you correctly. I'm seen similar question from you in another topic, but i'm doesn't understand. :)

Do you edit .dbr files and what you do with them?

If you leave them near .arz file, then no: from my observations game never read .dbr files, it read only .arz file. (For custom maps - it read's mod's file and original file. Records in mod file shadow (take precedence) over records from original file.) Note: that game may read resources in unpacked form, e.g. not from .arc files. There is difference. (However for text resources i'm see what game read them only from .arc file... or may be mistaken somewhere) :)

So, once you have pack of edited .dbr files, you must use ArtManager to build .arz file from them. Once you learn how to do it - rest should be simpler. You doesn't need to replace database.arz file.

Other tools which can edit .arz file probably work, but i'm never use them (in favor to ArtManager, but it sucks...).


As for content of edits: TQAE 2.7/2.8 write log file (near saves, in Titan Quest - Immortal Throne folder, log.html and log.xml), it was useful to get errors which may present. Some equations are tricky - some should be in parens some should not... and what the great nowadays? TQAE 2.9 create log life, but doesn't write any content into it, except header. I'm did not know how to enable them in 2.9, and this makes me sad, because i'm doesn't want going back to 2.7.

Quote
Why is editing an existing mod so difficult? :-(
I'm doesn't know. Because they create game in first place, they develop minimally necessary tools to accomplish this task, and they succeed.

It's actually not so difficult actually. Difficult is what modders do with Baldur's Gate. :) Their mods already in forms of scripts (weidu), but they often read data from files by raw offsets... :) Like read WORD from offset 0x38 (not true number here, just for example) from item file and checking some bit mask to determine or alter item class restrictions. Nowadays they has some libraries with procedures which helps, but overall stuff is non manageable and constantly comes with bugs.


Quote
Quote
                        record["itemClassification"] = "Rare";
                        record["--gx-itemClassification"] = value; // keep original value for later use

Wouldnt it make sense to switch these 2 lines around?
like saving the old value elsewhere before you actually change it?

otherwise the gx-itemClassification will only save them all as "Rare" cause the old values had been already overwritten beforehand.

would jsut be my guess as a programming noob :-)

No, "value" variable already holds field's value at this moment which we read before. So actually you can reverse this lines and get absolutely same result.

Not Yet Rated!

Offline lixiss

  • Member
  • *
  • Posts: 31
  • Country: ru
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: +3
Re: How to make epic/legendary items enchantable?
« Reply #6 on: 08 August 2020, 16:57:32 »
Why is editing an existing mod so difficult? :-(

Can you explain once again what you exactly do, step by step?

Not Yet Rated!

Offline bernd

  • Member
  • *
  • Posts: 10
  • Country: de
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone:  0
Re: How to make epic/legendary items enchantable?
« Reply #7 on: 08 August 2020, 23:18:30 »
Why is editing an existing mod so difficult? :-(

Can you explain once again what you exactly do, step by step?

first IU download the "test" mod (random name we'll assume it has for now).

in that "test" foldet, I have both the database.arz file AND all the folders game, creatures, etc. (basically what would be in the .arz file, jsut unpacked)

so I have the packed file there AND the unpacked folder stuff at the same time.

I now went and edited the gameengine.dbr file in the "game" folder.
changed the "experienceequation" line there.

did the same for the other gameengine.dbr file which is located in the xpack->game folder.

so i basically edited all the availlable gameengine.dbr text fil÷es by hand (with notepad++, jsut simple text editor like any other out there).

╬ would assume, like you say, that while I changed the unpacked stuff, the game only cares about the packed gameengine.arz file (and doesnt care about all the unpacked stuff in the same folder).
and obviously, since I never modified the .arz file, it still has all the old settings.

now it's jsut my main issue that I cant modify the .arz file.

I mean, I can of course unpack it and change the single files.

but getting all the, now changed, stuff back into an .arz file is beyon me.

ususally I could probably do this with art manager.
but I somehow got it kind of broken, let alone sayxing that I dont get how it works anyways.

so I would need a tool to take the usual folder structure of such a mod and put it back into a nice and neet .arz file.

only need to find a tool for that :-(


Not Yet Rated!

Offline bernd

  • Member
  • *
  • Posts: 10
  • Country: de
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone:  0
Re: How to make epic/legendary items enchantable?
« Reply #8 on: 08 August 2020, 23:22:13 »
let's say I were to try it again with art manager.

internet tells me o create a new mod and more or less "import" all the creature, game, database, etc. folders of the unpacked mod.
how do I do that?

sadly art manager has no real tutorial, so I dont know what does what in there :-/


I know how to create an empty mode.
but not how to actually fill it with stuff imported from some other folder :-/

Not Yet Rated!

Offline lixiss

  • Member
  • *
  • Posts: 31
  • Country: ru
  • Karma: +0/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: +3
Re: How to make epic/legendary items enchantable?
« Reply #9 on: Today at 00:02:01 »
...

I see your problem. Basically ArtManager doesn't care about too much stuff which you may read in various tutorials (setup an empty or bounce mod/etc), at least you doesn't need to care about this at all. You need care only about .arz file and .dbr files which you have (and ArtManager will not force you to care about something else).

So, what you definitely need, is run ArtManager, create your's mod's folder (let it be temp-mod) in Working directory with typical layout with set of .dbr files which you want change (i heavily recommend include only minimum required) - (importing one record in ArtManager may help do this). Now when you will try build - it will create .arz file in CustomMaps/temp-mod/database/temp-mod.arz and set of unpacked files too. If you can achieve this - then you are about of 99% job done.

So, in CustomMaps/temp-mod/database you see .arz and unpacked files. This unpacked files are used only for "change-tracking" -> ArtManager will not apply changes from source (Working/temp-mod/...), when source files are equal to this files which under (CustomMaps/...). You got idea. So you should remove unpacked files to force ArtManager apply our changes from Working (source) folder again. (It might not strictly need everytime, but i'm saying way which 100% work.)

So, generally in folder "CustomMaps/temp-mod/database" you should have only "temp-mod.arz".

Now you can put just here any .arz file, rename it as temp-mod.arz. And go into ArtManager and build temp-mod again. It will again put unpacked files in custom maps as well as apply changes into .arz file. Once this done, you can use this .arz file as normally should (e.g. rename back and place where it should be normally placed).

If number of your edits is not big, you should end faster with ArtManager.

(If you make your "temp-mod" as actual playable mod with any resources which you need - then you will need less steps to do same job again. So, if you want change existing custom map mod - then you can apply changes in it directly without redundant copying).

Otherwise you can wait for some tool from me. Generally i'm have dbr reading/writing on roadmap anyway, so i'm will be able create this sample tool relatively soon. But i'm doesn't want make empty promises, so it will not be any ETA (it might take two days, but might take week, who know?).

So, generally ping me bit later, i will try to help. But during this time there is good idea for you to make ArtManager work anyway. Applying various difficulty equations actually is not hard, and ArtManager might be useful later for something else anyway.

UPD: Add some fixes for better clearness (i hope).

ADD: Ah, sorry, I'm should reconsider/decline with .dbr. There is still might be another format or it will be another hacky interpretation of .dbr. The issue with .dbrs what they are generally ambiguous in data types and require templates to resolve this. Templates support also on roadmap, but later. However it should be still easy to make something what can edit arz, without relying on templates and still be flexible. Yes, i can read dbrs and can try to deduce missing type from exisiting arz, but this will be bad and unclear in the end. Also, from my understanding you even doesn't need to have full .dbr with every field defined/imported, in your case it might be more practical just to specify records/fields which you want to change. Still, ping me later, once i'm finish arz writing stuff i'm be able to resolve this in some way.
« Last Edit: Today at 00:39:21 by lixiss »

Tags:
 


SimplePortal 2.3.7 © 2008-2020, SimplePortal