Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: Heroes 4 Modding Revisited
Thread: Heroes 4 Modding Revisited This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV / NEXT»
JollyJoker
JollyJoker


Honorable
Undefeatable Hero
posted October 05, 2016 08:09 AM

@ NimoStar

Hey there. I would like to try to interest you for a mod, you might be able to do which is based on a general theory of mine which is:
If the in-game economy and balance is right, then you don't need hard caps on creature dwellings; instead, if you are offered too many creature options, then the player is going to pick anyway.

This means, the "either-or" hard cap for creature dwellings in HoMM 4 seems unnecessary to me. Instead, what I would like the game to be is the default setting being ONE Level 1 dwelling (randomly) pre-built, ALL dwellings being buildable and everything else up to player discretion.

Can you make a mod like that?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 05, 2016 01:44 PM

I recall the issue is that each dwelling above level 1, share town screen placement with it's opposite choice, which is likely also why, if both level 2 dwelling are build and you try to purchase from the fort, the game crashes. That and coz the fort recruit screen can't hold that many options normally. Theoretically you could move the dwelling placements in the upcoming HD mod, as town screens will be wider (I believe Dalai wrote it should be possible to move the placement of buildings), but you'd likely still have the fort crashing issue, unless that recruit screen can be modded/extended as well.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JollyJoker
JollyJoker


Honorable
Undefeatable Hero
posted October 05, 2016 02:01 PM

Thanks for that info!
In light of that the effort doesn't seem to justify the gain then.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 05, 2016 02:26 PM
Edited by Karmakeld at 14:30, 05 Oct 2016.

Well you could easily get about with just a simple script, pre-building a random level 1 structure in all towns. Adding the higher level dwellings will be more tricky, but I would prob. set up a continuous script, checking for level 2, 3 & 4 creatures. If the town has ghosts, you could asume the Barrow Mound has been build. Set town A has ghost dwelling true. You could ask player in a timed/continuous script just to be sure; Have you build Barrow Mound yes/no. If no, either do nothing or ask if it's true that no lvl 2 structure has been build. If yes to Barrow Mound is build, check if player has the required resources to build Ceberi Dwelling, if yes, would you like to build Ceberi Dwelling? If yes, build it and take resources. If no, either ask if player want to be asked tomorrow (leave script active) or no I don't wish to recruit Ceberi from this town at any point (remove the script).
You can use iLiVeInAbOx05's H4MG tool to put your script in a script library and with the tool easily copy/paste it to all towns in any given map. It will require some amount of scripting, but compared to the modding task, this might be an easier approach.
Oh and basically you should only need to actually set up the script to check for 1 creature type. Then you can copy/paste the script with H4MG tool and just change the creature type you're checking for, this will save you much time not having to manually script it all.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted October 08, 2016 06:04 AM
Edited by NimoStar at 06:05, 08 Oct 2016.

The editor way of doing things is discussed here:

thread for multiple dwellings

I had that idea myself too even before viewing it, as I detailed in the thread posted here "outline of the Greatest and Most Terrible Mod" (Some months ago when some people said it was impossible to do such a big mod as I was proposing - I basically just made it to prove them wrong : P  : P)

One can disable the castle. Possibly in a mod, one could disable the castle screen while keeping still the fort/citadel/castle building.
In any case, sadly ability to access screen from a menu still exists, but changing the text to deleted or disables shouls not be that hard either.
This would mean that you need to click every building individually to recruit.

As to get both at once, it would depend on changing the hardcoded feature of town evolution in the game.
The best equilibris developers would probably be better there than I am.

_____

Karmakeld, in other thread you said you were having problems with resedit2. I don't see a post detailing your problems, but building the .h4r file with the Hero Table should be pretty easy.

- Launch resedit2 as admin (I don't use compatibility on it)
- File -> create new resource
- File -> open resource (open the one you just created)
-- File is empty.
- Edit -> File Manager
-- A menu will display to the right
- Search and double click your edited table.heroes.txt file
- Now click on the "make chenge" button (right by the percentile bar)
-- Your file is built.
- Close resedit2 and place/rename your new file in the Heroes data folder (normally you have to name it new.h4r, depending on your version... new_mod.h4r for Equilibris, and nim_mod.h4r for Greatest Mod 0.10)

I hope this guide was good enough to solve your issue.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 08, 2016 08:07 PM

Sorry if I forgot to specify it, but I had issues packing my edits into a h4r file, but I already see some steps I'm missing in creating the file, when looking at the steps you listed, so I'll give it another try. Thank you.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted October 15, 2016 08:44 AM
Edited by NimoStar at 08:45, 15 Oct 2016.

Could you do it?

As a new thing, I have partial evidence that map editor can change the types of objects , no matter their image.

In this case, it is done so by an error in the objects tables... but if it can be done this way,
Why not engineered?

As it goes, this may be the beggining of wog-like editing
-maps where any picture can represent any object-

In this way, a town image could be a garrison, or a quest - and an altar image could actually be an idol of fortune, and so forth and so on. As long as they are both map objects, it could be interchangeable.

I don't know exactly how to control it yet - the mechanism applied here seems to be that all objects missing in the consideration on a table will be considered as the last object in that table.





(click images to view big version)

May we live in interesting times!
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 15, 2016 12:21 PM

Very interesting. Got no clue what the error says, but I hope you dig deeper and share your results. I'm using Tree's of Knowledge as quest huts in one of my campaign maps, but had to do it using placed events. Would be awesome if you could actually use it as both a quest hut and normal tree of knowledge.In another map, Magic Wells are to be poisoned, so to have been to make them quest huts, would've been nice too. This is definitely also a feature I would be using in the remaining part of my campaign.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted October 15, 2016 01:41 PM

The error basically says that another instance of the program re-saved an object type of something in the map, thus changuing it to something it wasn't the last time this instance of the program oponed it. That basically means object types can be changed, possibly independently of the graphical reference (probably has to do with the "different types of names" the equi developers mentioned here)

While this feature is used a lot in WOG, it hasn't been implemented in H4.

However, I only can give the idea. I cannot fully automate it. That requires an actual programmer with experience to write a sort of plug-in for the map editor. That is beyond my capabilities. Possibly by myself I could do so manually for each object at most, and as such other users would have to do the same.
However, if programmers are interested, I'm sure they could crack it for everyone to easily use. It is a bit of work, however, as everything.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 15, 2016 02:11 PM

Well I know some of the Equi guys are programmers and it seems they know parts of the game/editor, so we can hope they might look into this and share their knowledge.
I know this path is wrong, but I'm just trying to guess how you did it. So theoretically I could rename the object table to 'questhut.tree of knowledge' similar to how you made the creature heroes and that would potentially change/add a tree of knowledge quest hut?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Namerutan_
Namerutan_

Tavern Dweller
posted October 15, 2016 03:06 PM

Inside a .h4c map file, there is a table of objects. Each object in that table defines the type of object and the image to use. You can edit these data to specify an object in an unusual way, but I cannot guarantee how the game will act.

Screenshot of a hex view, with added colours for the different parts  of an object in the table of objects:


Best way would be to create new objects defining its types and images and update tables accordingly.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted October 15, 2016 05:29 PM

Creating new objects is cumbersome because of many reasons:
1- Tables can't be used as .h4d files, they have to be packaged (at least as far as I tested)
2- Some new objects probably have to be defined in the .exe
3- Creating new files (adv_objects)
4- Compatibility. You coudn't play this online or in LAN as each game would be different.
5- You would need a different object for every possible combination you want to do... this means not thousands, but even perhaps millions of possible objects (est. 1000 appearances * 1000 functions = aprox. 1 million)

IN CONTRAST:
1- Just editing the type and image of an objects lets you omit all that. No need to edit .exe, tables, or make new files
2- Universal compatibility. It's all in the map (well, universal compatibility with whichever mods apply - but you are not further modifying the game)

3- My tests indicate it works. At the very least the pirate island worked exactly as a normal pirate island, just with the other model and passability.

4- Probably this can be used to "bring back to life" the unworking but coded objects such as Magic Lamp. Just change the image so it is not the "DELETE ME NOW" (although in this case, a universal mod solution is preferrable to editing manually each time).

In any case, as in WOG this works normally, and the same people programmed H3 and H4 engine, probably recycling most of the code, I don't foresee any further difficulty.
[except occasional map file corruption as in there, but keep backups]
Only needs a campaign editor plugin or alternate editor program to change it (I would envision it as left click on object -> "change type" in menu -> choose object class and image from two drop-down lists of listed ones (just as brush or terrain lists))
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 15, 2016 06:27 PM

Namerutan_ said:

Best way would be to create new objects defining its types and images and update tables accordingly.



Well I'm guessing you'd have to know how to import those new images, as well as how you add new info, like the Equilibris artifacts, in order to create a new object. How I understand NimoStar did it, was by editing existing objects, which are already in the game.
Say I wished to combine 2-3 existing objects into 1, could that be done in a somewhat easy way?
The same goes for editing properties of existing objects. I should define it's type (quest hut) and it's image (tree of knowledge) and update the table, but how do I create it as a new object?

It would be neat to have a simple user-friendly program like iLiVeInAbOx05's H4MG tool, able of adding new objects.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted October 16, 2016 03:47 AM

Changing an object's "type"

Nimostar, if you can tell me exactly which fields you changed to achieve the "type change," this may be a feature that could be rather easily added to the H4MG. It just might take some time

Lets discuss on the Equilibris forum, I'll start a thread.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted October 16, 2016 05:33 PM
Edited by NimoStar at 17:56, 16 Oct 2016.

karmakeld there is no way for combining objects... unless you code a new combined object from scratch. The most you could do is place tightly packed objects, but each needs a different entrance.

____________

Actually, you need a new file for each new object. This is how Equilibris does it. But as they don't add new "object types" (at least yet), just new object images, this doesn't need to modify the .exe - but it's still a mod.

My method is not the same. You don't even add images of files. You just change one object type to other, and the image stays - all that changes is some bytes on the map file.

iliveinabox05, Namerutan just showed it better on the hex code.
I don't know how exactly the map files are structured because my change was an accident. But I can change it on the .aop files (the list from the campaign editor) and then place the objects. Watch:


(hex codes not included, but anyc an see form themselves on their default.aop)

¿What does this means?
Very simply, one of this codes is the image (water objects.lily pads.03, water objects.lily pads.04, etc.) and another is the actual object type and subtype ("decorative"->Type "lillypad"->subtype, in this case does nothing, but it can be any) . Edit one of them, and you have a "hybrid object", which looks like one and acts like the other (mind that the original one has an entrance, though, otherwise you will not be able to use it in most cases - there are exceptions such as the eyes to see, which you don't need to use)

Let's see a more useful example:


Miscellaneous.tavern = image (as found in editor list, and has file in heroes.h4r)

Tavern = object type (as defined in .exe)

You can change any of these (in fact, I can prove it was already done in original games: the "Hexis Castle" special object is just a garrison), but mind that two bits before the name is one that holds the lenght of the string



1d (29 in decimal)= Lenght of "miscellaneous.Garrison_Evil_R"
this is image

08 = Lenght of "garrison"
type

05 = Lenght of "right"
subtype



Probably, it's possible tu have sub-subtypes (or supertypes, if you prefer) indefinitely depending on the class of objects... for example towns are defined: "town->Academy->Right" ... that is, three values instead of two. Others may have just one, perhaps.

After this in the garrison there is some "seq" stuff, it may be empty space for triggers, or for placing the creatures in the garrison; I haven't tested, but "seq" (sequence) may indicate the former.
In any case I reccomend editing objects without properties to begin with (artifacts, power-ups, etc.) and then as we get savvy, up the complexity.

For now, I cannot change the lenght of total file without crashing the editor when it loads (suspect it has to do with file format, headers, footers, etc... but also my game has no registry keys for now, so it may be that too, although unlikely)

However, when it's done by better programmers, we can do almost anything, of course knowledge trees can be quest huts, but also they can bee normal trees, and so on.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 16, 2016 11:50 PM
Edited by Karmakeld at 23:59, 16 Oct 2016.

Well if only I knew how to add new objects
Anywho, placing objects upon one another isn't always a solution.
I'll give you a few examples, which should also explain my desire to combine them, as this would be time saving, compared to having to repeatedly add objects on top of one another.


Here I used 'evil' trees behind other trees. You'll have to match with certain trees for the evil trees to be properly hidden, only displaying the arms.
Or if you want more variation in the trees, you can put other trees behind them, but again it's time consuming to match the trees properly and add 2, 3 or 4 trees pr. tree, just for the visual effect.



This basically isn't possible, as some objects are higher or lower than others.
This is what is looks like in game.

You also have to consider that objects which are interactive/editable will jump to the top, dispite of ho they're placed in the editor. So placement isn't always a simple solution. If one has the knowledge, it shouldn't be hard to extract existing objects and combine them, like the Column with the Flame of Chaos on top compared to having to make new graphics and designs.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Namerutan_
Namerutan_

Tavern Dweller
posted October 17, 2016 08:47 AM

Do you mean something like this?



Check this [url=https://drive.google.com/open?id=0B9qanHBVny4_RUR2SVQ3ek5PNkU]teaser[/url]
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 17, 2016 05:45 PM

Yes Namerutan, exactly like that, but without having to Photoshop the image of course it should be 1 object, meaning the artifact will become part of the landscape object, and not an artifact you can still pick up.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted October 17, 2016 11:29 PM
Edited by NimoStar at 23:34, 17 Oct 2016.

Ah, I took "combining objects" as combining their functions, rather than as combining their looks.

Combining their looks in any way you desire is just as creating any other new object and should absolutely be possible and even easy in the future, it's just a bunch of pixels you stack and save as a new thing. (it would be a mod, though, not map editing)
THe only difficult thing in this regard would be combining animations, as they have different lenghts and loops. But from the examples you are not as concerned by this.

However some of your problems will also be solved by editor changing object types (without modding in new objects) - for example you could make those artifacts into just another decorative object with no passability/pickupability.
(AKA your "flame of chaos" would not actually be a flame of chaos artifact)

Or as mentioned just make your desired decorative object appearance the "Usable" one instead of having to hide the "real" object in the back.

Also it would be possible to script a different brush type that "combined" objects into a single tile, like placing the trees automatically into your "combined trees", but I don't think anyone will do it - the current brushes are scripted so that objects DON'T share the same placement tile. However, you could still use them for quicker stuff - make a brush with 100% one types of tree, then other with 100% other type of trees, and then place them on the same tiles... those type of tress will be "combined" randomly according to your choices. Same with any other object. This is the makeshift solution for the time.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted October 18, 2016 08:37 PM

Okay I understand your wondering but I merely wish to combine objects (like Namerutan's teaser), not their function. A Tree of Knowledge quest hut also still working as a Tree of Knowledge power up, sure sounds like a bad mix.

Essentially the Flame of Chaos would still have to be added as a new object in order to keep both - object AND artifact.
The same would then be true regarding making Tree of Knowledge a quest hut. Changing type, replaces it. I'm beginning to better understand how things work.

I have considered making brushes, but like you said, a brush don't use the same tile, so I'd need to make 'background tree #1, middle tree #1, visible tree#1, same for #2, ..#3 etc. Like I wrote earlier, simply placing them randomly upon one another - 1, 2 and/or 3 - isn't a good option as the result could look unnatural.
It is though still a solution untill someone enables the brush to place objects in the same tile

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0934 seconds