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: How to copy map scripts to another map?
Thread: How to copy map scripts to another map?
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted September 14, 2019 10:55 PM

How to copy map scripts to another map?

So, some maps come with scripts, including of my own. But so far, I have found no simple way of copying map scripts and passing it to another simply. This is a pain in the @ss if you have to script something very complex all over again each time you make a map.

For example, Pandora's boxes and obelisks are in map properties, NOT in object properties.

So, how to do this? Are there any tools or text editing for this?


____________
Never changing = never improving

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


Honorable
Famous Hero
posted September 17, 2019 06:32 PM
Edited by iliveinabox05 at 18:33, 17 Sep 2019.

The H4 Advanced Options Map Editor can easily do this. You can also save your events so that you don't have to find the map with the particular scripting you're looking for, it will be loaded and available for copy / paste when you start up this editor.

A link to the thread on CH is here

It looks like the screen caps I included to show how to do things have been ruined by photobucket, so if you decide to use it, you'll have to go off of the text or just ask me.

I can't remember if you can save scripts, but you can definitely save events and then open the events and copy / paste the scripting.

This tool was created in Java, so Java is required if you want to use it. There are instructions at the link above.

There is also H4Util that can export and import scripts between maps, but I was never able to get it to work.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 19, 2019 04:08 AM

Ok, thanks,

The copy and paste events in map properties seems to work, though the UI is more than clunky (keyboard whortcuts like ctrl+c or del don't work, only right cliking to copy and paste)


In any case I have been unable to "generate" map with the settings since I see no button to do it.


("edit", "tool" and "campaign" buttons do nothing)

To people, do note that java asks you to make an account to download their file... and that is slow and clunky.

____________
Never changing = never improving

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


Honorable
Famous Hero
posted September 19, 2019 05:57 PM

Yeah the interface could definitely use a little work, so if you have suggestions, please let me know.

As far as ctrl + c / v, they do work, but I think you may have to have your cursor over the window where you're trying to copy the scripts / events, and then the cursor needs to be over the window where you're trying to paste them to (might have to click the window to make sure it has the focus).

As far as the "Map" tab, I think that is where I intend for the random map generation to be, but it is incomplete at the moment.

If you want to create a map from the settings you have applied to whatever map you have opened, you'll need to click file->save as and that will create a new .h4c file.

Let me know if you find anything not working or if you have any more questions.

And that's annoying about having to create an account on the Java page to download it. Not sure when they added that. Maybe I'll go create an account and download the files so we can have them available outside of that..

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 21, 2019 12:31 AM

Quote:
As far as the "Map" tab, I think that is where I intend for the random map generation to be, but it is incomplete at the moment.

If you want to create a map from the settings you have applied to whatever map you have opened, you'll need to click file->save as and that will create a new .h4c file.


Thanks, Will try that.

Quote:
As far as ctrl + c / v, they do work, but I think you may have to have your cursor over the window where you're trying to copy the scripts / events, and then the cursor needs to be over the window where you're trying to paste them to (might have to click the window to make sure it has the focus).



I did try this, still no case. Might have to do with OS versions if it works for someone else. Or maybe I will try starting it as admin. In any case, it's not that big of a deal (as long as you are copying a few scripts and not many), it's just my custom to use keyboard shortcuts.

Quote:
Yeah the interface could definitely use a little work, so if you have suggestions, please let me know.


Well it would be my preference if the tabs on the left are up, not down. After all that's how they work in the original Campaign Editor when selecting options. It took a while until I realized there was more than one tab and the options I needed were in another one.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted September 26, 2019 01:44 AM

NimoStar said:
I did try this, still no case. Might have to do with OS versions if it works for someone else. Or maybe I will try starting it as admin. In any case, it's not that big of a deal (as long as you are copying a few scripts and not many), it's just my custom to use keyboard shortcuts.


I took a look at it, and if you highlight the scripts you want to copy and press crtl + c before clicking on another window, and then actually click on the script window where you want to paste, then you can hit ctrl + v and it should paste the scripts. A little cumbersome, but it should work.

The operating system shouldn't matter because Java is supposed to be platform independent, but if the above doesn't work then that could be the problem.

NimoStar said:
Well it would be my preference if the tabs on the left are up, not down. After all that's how they work in the original Campaign Editor when selecting options. It took a while until I realized there was more than one tab and the options I needed were in another one.


I'm not sure why I put them on the bottom, maybe because the map tabs are on the bottom, but it's probably better to emulate the actual game editor as much as possible, so I'll move them around and see how it looks.

 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.0273 seconds