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 3.5 - WoG and Beyond > Thread: How to set the position of an enterance in map object?
Thread: How to set the position of an enterance in map object?
TURBANELLOS
TURBANELLOS


Hired Hero
posted December 03, 2015 02:56 AM
Edited by TURBANELLOS at 02:59, 03 Dec 2015.

How to set the position of an enterance in map object?

As the topic said, I used DEF maker to make some pictures to become the map object model, but I don't know how to set the enterance for the object..

Those are dwellings of my new Forge Town.



The yellow parts(enterance) are all in the right position, but I suppose that some of them should be in left. How can I do that?
____________
Making a new mod..

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


Known Hero
professional ERM™ scripter
posted December 03, 2015 08:43 AM

If using a hex editor/binary editing, change the 6 bytes after the object's def name to change its passability, and the next 6 bytes after those to change its active (yellow) tiles.

Quote from my code:
Quote:

   // The passable and active arrays are bitfields representing an 8x6 tile
   // region where bit 1 marks passable and bit 0 impassable. Counting goes
   // from left to right downwards towards the bottom right corner. This means
   // that first bit in passable[0] is [x-7, y-5] from bottom right corner and
   // last bit in passable[6] is the bottom right corner.



There is also an extension for the WoG map editor that allows you to make such changes from the GUI, by pressing space with the object selected in the WoG map editor.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 03, 2015 06:08 PM

It depends for which platform your town is. If for WoG/Era you have the object editor in tools folder, where you can set red/yellow squares then generate map code. If for VCMI, you must ask them, I don't know.

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


Promising
Supreme Hero
posted December 03, 2015 07:14 PM

In VCMI red and yellow squares modders are set by themself using plain text. Here's the code: http://wiki.vcmi.eu/index.php?title=Object_Format

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


Legendary Hero
posted December 17, 2015 11:39 AM
Edited by Baronus at 11:41, 17 Dec 2015.

You can edit exe file too.
Modding guide (polish language):

http://soe.bnx.pl/readarticle.php?article_id=6

Adress:
0x28AA00
First building:
> AA 00 bc 0a yz 0x <
> 00 00 C3 02 A6 00 <

AA - number of animation frames, in example 0 - no animation here.
00 - free space, if animation have more than 256 frames :-)
bc 0a - x argument (space betwen left brink of ecran and left brink of building) in pixels.
Here C3 02, reverse 02C3, in decimal  707.
yz 0x - y argument ( upper brink ecran and building)
A6 00 -->00 A6 =166.
And next buildind.
How is order of buildindgs? Here can help buildings.txt from bitmaps.lod. Compare it.

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


Promising
Legendary Hero
fallen artist
posted December 17, 2015 02:16 PM

Salamandre said:
It depends for which platform your town is. If for WoG/Era you have the object editor in tools folder, where you can set red/yellow squares then generate map code. If for VCMI, you must ask them, I don't know.

Object format is compatible between H3 and VCMI. You will see exactly same footprint in editor or RMG. Just VCMI uses JSON instead of hex edit or text tables.
____________
The future of Heroes 3 is here!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0455 seconds