Macron1 topic for different stuff

DEF CHECKER v. 0.0.1 (Windows only)

Another small utility which was very-very helpful for me to correct a lot of issues.
Run this program, press Start button, and select JSON files of creatures (they must be located in your mod structure, for example, in folder “/config/-creatures/”
Program searches for values of “battle”,“map”,“iconsBig”,“iconsSmall” and checks, that these files are present in “/Sprites//” folders.

Now it works only, if values are on the same line as identifiers.

Example of good JSON information:

This helped me to figure out a dozens of wrong paths to map animation DEFs, missing missiles DEFs and icons.

PS In plans I have improving of this utility to check existence of sound files also.

PPS This works only with mods, where “Content” folder is not zipped. To use it with zip first unpack contents of “Content.zip” to /Content/

PPPS There were problems with adding attachments, now they are fixed, so I share this tool.
I think I will add later also checking of DEF/Graphics files for heroes JSONs, faction.json and structures.json. But now I don’t have time for this.
DEF Checker v 0.0.1.zip (18.5 KB)

As I wrote earlier, modding system allows to replace all 9 standard towns by new towns.
I think i’ll write some FAQ with files and examples later.
The thing is to turn off standard heroes and creatures by setting “special”:true to them.
Here you can download “ban-mod”, that sets all standard creatures and heroes as special.
Standart heroes will not appear in taverns and on map, if not directly set by map editor.
Creatures will not appear of map if also not set directly on map. Still they will be in standard banks (there is no modding for banks and dwellings yet).

PS This mod is for technical demonstration.
But I think it can be used to play map, where only few heroes set by map creator will fight. And their death will lead to defeat :slight_smile:
Mod needs “wog” to run, cause it turns off level 8 creatures also,
ban-mod.zip (6.66 KB)

MACRON1 PUZZLE TEMPLATE FOR PAINT.NET

I’d like to share PDN multi-layer file for Paint.NET, that I’m using to easily create puzzles for new factions.
It’s not classic, I tried only to make easy and quick way for puzzles, not bother with H3 puzzle style.

  1. Place picture of correct size (596X546) on “Picture layer”.
  2. make layer 47 visible (other numbered layers must be hidden). “Save as” 8-bit 00.bmp.
  3. Hide 47 layer, make 46 layer visible. repeat this until you have 00-47.bmp on your disk.
    JSON puzzle file for them also in archive.
    Just rename “mytown” by your town identifier.
    PuzzleTemplate.zip (37 KB)

STUFF TO MAKE TOWN ICONS AND HALL BACKGROUND

There are 32bit transparent PNGs that can be used to make town icons (they have border and checks on them). Create 2-layer file, on 1st layer place town icon, on second place one of these files.

Also there is multi-layer template (Paint.NET format) for creating town hall backgrounds.
It already has lot of hall icons variants on diff layers.
Remember, that it must be saved as 8-bit PNG file.
Now it’s only 8-bit graphics because of limitation of VCMI engine, so if you place picture of background on “background” layer, it can become corrupted in game.
I hope 32-bit support for town icons background is on it’s way.
UPG In 0.94b/c/d you can already use 32-bit Hall background, so you can add a layer with background picture under hall icons layer, and get nice looking hall background.
Standard Things.zip (1.07 MB)

So VCMI 0.94b is out. I corrected this migration script to convert buildings/faction/structures.jsons to new format and used it on VCMI towns until they converted without errors.
To convert town buildings place this script in one folder with buildings.json/structures.json/faction.json.
To run program without actual correction of initial files you must input command (this will be helpful to look to output of console and see if process had no mistakes):

./VCMI095_Migrator_Script.pl 0

To run program with changes of files you must input command:

./VCMI095_Migrator_Script.pl 1

I’ve tested it, and didn’t get errors on my files.

Perl script uses only regular expressions and works only with text, requires no special Perl modules. Script was tested on Debian and Windows 8.1.

PS If there will be more changes in VCMI modding system , I will correct script to fit new expectations…
VCMI095_Migrator_Script_v02.zip (2.71 KB)

Fixed.

There is a reason why we have wiki:
wiki.vcmi.eu/index.php?title=Modding_changelog
Complete list of changes since 0.94

VCMI095_Creature_Migrator_Script.pl

This is pure Perl script I wrote to automate migration of creatures JSONs to 0.94b (0.95 actually).

It comments strings in “sound” section, that point to “” (no sound file).
Also it adds “idle”:1 to “animationTime” section.

To run program you must write:
VCMI095_Creature_Migrator_Script.pl
It saves backup copy to same folder and then tries to migrate file to new format.
VCMI095_Creature_Migrator_Script_v01.zip (1.36 KB)

BAN MOD v. 0.2 for VCMI 0.94d

Now this mod not only removes standart factions heroes and units from selection, but also removes all standard factions from selection on start!
You can comment in mod.json only those factions that you want to play with.

Now this will work only with maps, where no standard towns are placed in editor.
So if you want to play only with factions of your choice, you must find good map.
ban-mod.zip (8.49 KB)

Next version of Macron1 puzzle creation.
Now you need to install ImageMagick on your computer and then do things as described in readme.txt.
You must prepare 596x546 picture to be inserted as puzzle. Then it will be cutted to set of PUZxx.png files. You can quickly make 32-bit puzzles then :mrgreen:
puzzle_generator.zip (41.3 KB)

DEF Recoloring Program v.0.0.2 from Macron1

This program allows to change colors in DEF palette. You can load creature or map object def, and change one colors to anothers. After saving resulting DEF you will get recolored thing.
Now you have mechanism of automatic recoloring using previous recolors.

PS Program is written in Borland Builder C++ 5.0. Program was made quickly, so there is a ugly quickly written code (bydlokod :mrgreen: ).
DEF Recoloring Program v.0.0.2.zip (123 KB)

BAN MOD v. 0.3 for VCMI 0.97b

Now standard dwellings and banks from HMM3 (not WOG) also banned from map.
ban-mod.zip (9.57 KB)

DEF Recoloring Program v.0.0.3 from Macron1

This program allows to change colors in DEF palette. You can load creature or map object def, and change one colors to anothers. After saving resulting DEF you will get recolored thing.
Now it has mechanism of automatic recoloring using previous recolors. But it needs to be impoved.
DEF Recoloring Program v.0.0.3.zip (124 KB)

Macron1 Modern Roads v. 0.0.1

Simple made replacements for standard roads:

  • asphalt road,
  • automobile road with road markup
  • railway

Forge your Heroes 3 :mrgreen:
modern_roads-mod.zip (6.34 KB)

4K UHD (3840x2160) Support for VCMI

File “resolutions.json” goes to C:\Users<username>\Documents\My Games\vcmi\config
File "AdvMap3840x2160.png goes to “Mods\vcmi\Data” (vcmi mod, folder “Data”)

I quickly made it and didn’t test it with many towns and heroes, so maybe background still needs corrections.



4k_uhd_resolution.zip (468 KB)

top arrow buttons are duplicated. Resources bar is a mess.

Other then that such big res seems unplayable. Town window is really to small for my taste. Takes away a lot from game feel .

Fred79 Object Patch confguration JSONs v.0.0.1

Extract and place mod files to /Mods folder.
With help of MMArchive or other tools extract all DEF files from FREDOBJ.pac file to /Content/Sprites directory of Mod.
I didn’t included Fred79 assets due to avoid legal problems and screams about “stealing” from Russian community.

This set of Fred79 objects is incomplete and uses my own look at objects names/uses.

  1. About several hundred DEF files are not configured, because they are not changed since Fred79 first objects patch release.
  2. About 3 hundred objects like dwellings without flags, banks, are not configured also for my reasons.
  3. I didnt test appearance on maps of all objects - because we have no map editor yet to test this.
  4. I commented in “mod.json” config files for “Walls.json” and “Mines.json” - Walls don’t make RMG maps look good. Mines are crashing RMG in this mod - didn’t have time yet to find why this is happening.
  5. I changed DEF paths to root folder with Regexes, so some templates maybe get lost due to syntax errors :sunglasses:

Enjoy if you can. There seems to be some bugs cause RMG sometimes crashes when generating maps.
fred79objects-mod.zip (133 KB)

^Very intersting. Still looking forward to proper object support :unamused:

Why can’t you do this on your own and distribute complete mod?

Hi, I just ported Macron’s Balancer program to Python, all previous issues should be fixed now.

How to use it?
Via command prompt:

  1. Open command prompt and set working directory same as path to this script
  2. Type name of the script or just drop it over cmd
  3. Drag and drop valid JSON file
    You also can specify many files by repeating step 3. but remember to separate them by space.

Via dragging and dropping files as well as folders with JSONs over script icon.

Any encountered bug please report to my priv.

EDIT: fixed buggy replacing min\max fields
EDIT2: added possibility to drop files and\or folders with JSONs over script icon
EDIT3: fixed wrong parsing few cases
Macron’s Balancer.zip (5.63 KB)

Macron1 - you can give here the exact mathematical equation/formulas how to calculate AI/Fight values? It would simplfy some things :slight_smile:

Hi, after few days of coding I’ve eventually finished a script in Python, which (I hope :slight_smile: will help you to convert most (if not all :slight_smile: of H3 random map templates to compatible with VCMI JSONs.

To use it simply drag and drop H3 RMG templates over script icon.

Edit: Now it is possible to parse a file with multiple templates.
Edit: Fixed bug when OH3 template doesn’t contain monster strength in single zone.
Edit: Now script can properly parse multiple portals per one connection (sth. like: “a”:“1,2”)
Edit: Uploaded new version which works with Python 3.5.1
H3 RMG Converter.zip (5.08 KB)
H3 RMG Converter.zip (5.08 KB)