|
Thread: How to copy map scripts to another map? | |
|
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
|
|
iliveinabox05
Honorable
Famous Hero
|
posted September 17, 2019 06:32 PM |
|
|
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.
|
|
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
|
|
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..
|
|
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
|
|
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.
|
|
|
|