|
Thread: Editor trick | This thread is pages long: 1 2 3 · «PREV / NEXT» |
|
Roman2211
Adventuring Hero
|
posted February 24, 2019 04:55 PM |
|
|
Karmakeld said: I do have a test map with all hero classes set as level -1 in case you want it.
Did you create heroes without skills? I could not get the "level -1", but "level 0" are get is only one skill for hero. "level -1" in theory is means a hero without skills, but the game gives the starting skills depending on the hero class.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted February 24, 2019 10:21 PM |
|
|
Roman2211 said:
Karmakeld said: I do have a test map with all hero classes set as level -1 in case you want it.
Did you create heroes without skills? I could not get the "level -1", but "level 0" are get is only one skill for hero. "level -1" in theory is means a hero without skills, but the game gives the starting skills depending on the hero class.
Yes I and others have created level -1 heroes with NO skills. You should be able to do so in the editor if you follow my steps. When starting the game the herow will start as level 1 with skills if you don't give the hero a skill. You can't have zero skills in game, only in the editor. I'll mail a map to you Roman.
____________
|
|
Teller
Tavern Dweller
|
posted March 25, 2020 09:40 PM |
|
|
Karmakeld said:
Roman2211 said: How to select any portrait for heroes
Easy)))
1. Put the hero, from we are need the started skills, example Barbarian
2. Proporties - Level 1... - Skills - Custom flag - OK
3. Level 1... - select Base class, depends on what portrait you need, example Mage - OK
4. Done! Our mag knows how to fight, but does not magic)))
I think it would be more accurate to call this trick, how to change starting skills, as you start by selecting a class and then change the class. Coz this trick still doesn't allow you to use e.g. a Knight's portrait on a Thief's class, that you still need the FaceTool to do - (classes still keep their normal adventure appearance, even if their class might change to match their skills).
Anyway, Mirage, try this.
Place a hero on the map - try a Knight. Open the army properties, next open to Hero Properties.
Go to Skills and check the box Custom.
Click ok, taking you back to the Army Properties.
Now open the Hero once more, to Hero Properties.
Now change the Base Class - try Lord, click ok and ok.
Now you have a Lord with Basic Tactics and Basic Defense.
You even have the options to remove the skills and then you can asign new ones. Note if you leave your hero a level -1, the hero will automatically start as a level 1 hero with standard skills.
You can now create a hero who starts with 2 Primary Skills (Advanced classes) and 0 Secondary or just 1 Primary skill.
I can upload a map with blank level -1 heroes you can edit yourself if you like.
Thank you for this guide, which I understood!
I was just about to start a thread asking about this, when I found this thread! :-) Saved my day - for now, at least :-)
|
|
Karmakeld
Responsible
Supreme Hero
|
posted March 28, 2020 02:48 PM |
|
|
Teller said:
Thank you for this guide, which I understood!
I was just about to start a thread asking about this, when I found this thread! :-) Saved my day - for now, at least :-)
Nice to know others found it useful
____________
|
|
IamNotHelping
Hired Hero
|
posted July 03, 2021 01:57 PM |
|
|
Creating Alliance in a campaign during the game
Sorry, I am new to this forum so I couldn't create a new thread.
I hope you don't mind if I ask a question it.
I am havjng an issue creating alliance in the compaign editor (I am using the default Heroes4 editor) during the game.
The situation I have is there are 5 factions.
Orange solo played by human,
Red and Teal are allies played by PC,
Purple solo played by PC,
Green solo played by PC.
I wish to create an event where we chose what to do next,
1 attacking the purple,
2 form an alliance or at least a treaty of non Aggression with the purple so that both of us can focus on our other enemies.
For the moment, I made it somehow work by putting a gate between us and the purple, with a boolean variable limiting both of us from passing it.
Set boolean variable gate to true
(before the alliance we can pass the gate normally)
Ask do you ally
If yes
Then Set boolean variable gate to false
Else set boolean variable gate to true
At the gate:
Or (player is red) or (player is green) or (player is teal) or (gate is true)
I wanted to ask if there was a way to change the status of our relationship in the eyes of the game system.
I can close the bridge that is between us but there are multiple routes that still link us and closing them would change the map too much.
____________
|
|
Zense
Tavern Dweller
|
posted July 04, 2021 01:43 AM |
|
Edited by Zense at 01:44, 04 Jul 2021.
|
IamNotHelping said: Sorry, I am new to this forum so I couldn't create a new thread.
I hope you don't mind if I ask a question it.
I am havjng an issue creating alliance in the compaign editor (I am using the default Heroes4 editor) during the game.
The situation I have is there are 5 factions.
Orange solo played by human,
Red and Teal are allies played by PC,
Purple solo played by PC,
Green solo played by PC.
I wish to create an event where we chose what to do next,
1 attacking the purple,
2 form an alliance or at least a treaty of non Aggression with the purple so that both of us can focus on our other enemies.
For the moment, I made it somehow work by putting a gate between us and the purple, with a boolean variable limiting both of us from passing it.
Set boolean variable gate to true
(before the alliance we can pass the gate normally)
Ask do you ally
If yes
Then Set boolean variable gate to false
Else set boolean variable gate to true
At the gate:
Or (player is red) or (player is green) or (player is teal) or (gate is true)
I wanted to ask if there was a way to change the status of our relationship in the eyes of the game system.
I can close the bridge that is between us but there are multiple routes that still link us and closing them would change the map too much.
How about something like this:
You setup green team to be an ally of your team, and if you choose to have purple as your ally then make all his castles, armies and heroes change from purple to green team?
This does depend on you not having used all the colors already. I haven't tried this but I believe it should work as long as you regulate all the armies of the purple player and don't let him make new armies and heroes before he changes color.
____________
|
|
IamNotHelping
Hired Hero
|
posted July 04, 2021 02:46 AM |
|
|
Zense said:
IamNotHelping said: Sorry, I am new to this forum so I couldn't create a new thread.
I hope you don't mind if I ask a question it.
I am havjng an issue creating alliance in the compaign editor (I am using the default Heroes4 editor) during the game.
The situation I have is there are 5 factions.
Orange solo played by human,
Red and Teal are allies played by PC,
Purple solo played by PC,
Green solo played by PC.
I wish to create an event where we chose what to do next,
1 attacking the purple,
2 form an alliance or at least a treaty of non Aggression with the purple so that both of us can focus on our other enemies.
For the moment, I made it somehow work by putting a gate between us and the purple, with a boolean variable limiting both of us from passing it.
Set boolean variable gate to true
(before the alliance we can pass the gate normally)
Ask do you ally
If yes
Then Set boolean variable gate to false
Else set boolean variable gate to true
At the gate:
Or (player is red) or (player is green) or (player is teal) or (gate is true)
I wanted to ask if there was a way to change the status of our relationship in the eyes of the game system.
I can close the bridge that is between us but there are multiple routes that still link us and closing them would change the map too much.
How about something like this:
You setup green team to be an ally of your team, and if you choose to have purple as your ally then make all his castles, armies and heroes change from purple to green team?
This does depend on you not having used all the colors already. I haven't tried this but I believe it should work as long as you regulate all the armies of the purple player and don't let him make new armies and heroes before he changes color.
Thank you so much, I didn't think of this.
We should be able to transform the new army he creates with a continuous event or some triggerable events.
Edit: Nvm, it seems we cannot select armies with events from the map. The action change owner therefore seems impossible to implement.
We also need to hide some blue troops benith a mountain (the color of the new ally) otherwise they would transform into no player town
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted July 04, 2021 04:34 AM |
|
|
IamNotHelping said: Thank you so much, I didn't think of this.
We should be able to transform the new army he creates with a continuous event or some triggerable events.
Edit: Nvm, it seems we cannot select armies with events from the map. The action change owner therefore seems impossible to implement.
We also need to hide some blue troops benith a mountain (the color of the new ally) otherwise they would transform into no player town
The change owner event can be on town objects, mines, and armies (not heroes). Dwellings can probably use this script as well, but I'd need to take a look.
You can't make this work on new armies that are hired, since you can't put scripts on these, but anything that is already on the map can have these scripts.
It would be a bit annoying to do, but you could put placed events around that would kill these other army stacks of the original color before you run the change owner script so that any armies that are unable to be switched will just be killed off.
|
|
IamNotHelping
Hired Hero
|
posted July 04, 2021 05:50 AM |
|
|
iliveinabox05 said:
The change owner event can be on town objects, mines, and armies (not heroes). Dwellings can probably use this script as well, but I'd need to take a look.
You can't make this work on new armies that are hired, since you can't put scripts on these, but anything that is already on the map can have these scripts.
It would be a bit annoying to do, but you could put placed events around that would kill these other army stacks of the original color before you run the change owner script so that any armies that are unable to be switched will just be killed off.
I meant that events events created in Campaign-map properties-event couldn't select existing troops or cities. Which is why it doesn't have access to the script "change owner".
Dwellings can have the script "change owner", however they can only have triggerable events, unlike the armies, mines, garrisons or towns that can have timed and continuous events as well.
To kill the armies who wouldn't switch sides, did you mean to created placed events that would start an unwinnable combat if they are an army that didn't change color? It seems like a mess to script it (so that their army doesn't get attacked before we chose to ally with them or if we chose to stop the alliance later on) and it would make the editing map more confusing. I think it would be much easier to change the plot a bit to justify the existence of purple(original color) armies who doesn't wish to ally with the player.
Thanks for the reply, I just started editing maps so I am a bit unfamiliar with things.
Edit: Is there a difference in the computation between an triggerable event and a continuous one who are making something similar?
For example in this case its either
Triggerable:
An event aske if we want to make an alliance, if yes trigger the triggerable event on all the armies and buildings we want to change owner.
Continuous:
An event turns the Alliance boolean variable to true.
The continuous event on all the armies and building we want to change owner keep checking if alliance is true or not, they react to the change of Alliance.
It seems to me that the continuous one requires less computation which means less crach, or are the 2 of them comparable?
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted July 04, 2021 06:17 AM |
|
|
IamNotHelping said: I meant that events events created in Campaign-map properties-event couldn't select existing troops or cities. Which is why it doesn't have access to the script "change owner".
Dwellings can have the script "change owner", however they can only have triggerable events, unlike the armies, mines, garrisons or towns that can have timed and continuous events as well.
I know what you meant I was just letting you know where that particular script can be found.
Triggerable events are all you need. When your question is answered, you simply call that triggerable event. You can call triggerable events from map events, or anywhere really. You still have to use triggerable events for changing town and army owners in the way you want to.
IamNotHelping said: To kill the armies who wouldn't switch sides, did you mean to created placed events that would start an unwinnable combat if they are an army that didn't change color? It seems like a mess to script it (so that their army doesn't get attacked before we chose to ally with them or if we chose to stop the alliance later on) and it would make the editing map more confusing. I think it would be much easier to change the plot a bit to justify the existence of purple(original color) armies who doesn't wish to ally with the player.
Thanks for the reply, I just started editing maps so I am a bit unfamiliar with things.
The scripting actually wouldn't be too hard, it's just annoying to have to do it.
Basically, yes, you would have placed events scattered around the particular player color's area, which would have an unwinnable battle they have to fight. You would have an outer conditional on a boolean variable that would be false, then inside that conditional you would have another conditional checking to see if the player was the original color and kill the stack if it is.
You enable the first conditional whenever you change the player's color.
Then, anytime one of the armies you can't control steps on one of the placed events, they go bye bye.
Like I said, it's just a workaround and it might not necessarily fit what you want to do. It also might kill something you don't want it to, as army splitting doesn't also pass along scripts that were on the initial army.
IamNotHelping said: Edit: Is there a difference in the computation between an triggerable event and a continuous one who are making something similar?
For example in this case its either
Triggerable:
An event aske if we want to make an alliance, if yes trigger the triggerable event on all the armies and buildings we want to change owner.
Continuous:
An event turns the Alliance boolean variable to true.
The continuous event on all the armies and building we want to change owner keep checking if alliance is true or not, they react to the change of Alliance.
It seems to me that the continuous one requires less computation which means less crach, or are the 2 of them comparable?
Well something to keep in mind: continuous events run for any action, so they can run a lot. There are certain times when this could be what you want to do, such as testing for custom win or loss conditions, but I don't think it's what you want here.
What you want is to have a triggerable event on each of the things you want to change the owner for. You will want to give each of these triggerable events all exactly the same name, which will make things significantly easier.
When you have your question answered, then all you have to do is trigger custom event, and select the event name for all of your change owner scripts. Since you named them the same thing, you only need to call that one triggerable event, and they will all be called at that point.
The continuous event works, too, but remember, it's running all the time, when all you need to do is just tell them once to switch. Since you're going to script the events anyway, might as well just use the triggerable.
And if you don't want to script every single army and object individually, take a look at the H4 Advanced Options Map Editor, which can copy and paste events and scripts between maps and objects, significantly reducing the time you have to spend on that stuff.
Edit. Also, welcome to the forum! It's always nice to see map makers still around creating maps
|
|
zense
Tavern Dweller
|
posted July 04, 2021 09:29 AM |
|
Edited by zense at 10:18, 04 Jul 2021.
|
I was thinking exactly of the solution iliveinabox05 wrote. As for getting rid of the other armies, if you have castles placed for this team you can just put placed events near the entrance of these, like how a user I can't remember the name of did in his Conquest of Four Lakes hardcore version, but in this case have the placed events kill off the new stuff like mentioned above. To make sure you don't kill anything you put in the start you could make them check if the armies have certain heroes.
These heroes would need to have their names be custom of course, and it would mean that this team wouldn't be able to buy more heroes.
Oh another alternative is that you could also hinder the PC from buying any more troops by putting out lots of single armies that are put to guard so that he exceeds the 7 army limit or what number it is. I'm pretty sure this limit exists for the AI too. So that when you make him change color you can just kill off these single creature armies with a truggered combat script.
You wouldn't need the placed events in this case, but this could have cases where you run into problems. Like if the armies you have placed in the map editor all die or the PC combines the armies you have placed then the PC would be able to make more new armies that won't change team color in this case.
In the end it all depends on your map and what you are trying to do, but I believe there is a good or good enough solution to be found for what you want to achieve.
To answer another question I know for a fact you can trigger changing of owner of a dwelling so these should be fine.
Edit: Rereading your post I thought of another alternative where you basically need three colors. Lets say green is the color you want your ally to be and purple and teal are the colors before he eventually becomes an ally. Your "pre-ally" starts with the color purple and surrounding the entrance to his castles is a fence of placed scripts that would change a purple army that isn't one of the starting armies you put out (which you can either differentiate by checking if they have a hero, or if they have a very specific item you gave either the creatures or the hero) into teal color.
When you then agree to become an ally you would just need to make a timed or continuous event that in a conditional script checks if an army is teal and if so changes it into green as well as triggering the change of the purple armies you placed in the editor.... And now while writing this I'm slowly realizing that you can't change the color of an army from the continuous events of the map, as far as I remember. But I'm leaving this in case someone thinks of a way to make it work. I'm not even sure placed events can make a passing army change color. I believe not.
|
|
IamNotHelping
Hired Hero
|
posted July 04, 2021 10:45 AM |
|
|
zense said:
Edit: Rereading your post I thought of another alternative where you basically need three colors. Lets say green is the color you want your ally to be and purple and teal are the colors before he eventually becomes an ally. Your "pre-ally" starts with the color purple and surrounding the entrance to his castles is a fence of placed scripts that would change a purple army that isn't one of the starting armies you put out (which you can either differentiate by checking if they have a hero, or if they have a very specific item you gave either the creatures or the hero) into teal color.
When you then agree to become an ally you would just need to make a timed or continuous event that in a conditional script checks if an army is teal and if so changes it into green as well as triggering the change of the purple armies you placed in the editor.... And now while writing this I'm slowly realizing that you can't change the color of an army from the continuous events of the map, as far as I remember. But I'm leaving this in case someone thinks of a way to make it work. I'm not even sure placed events can make a passing army change color. I believe not.
Thanks for taking the time to write this long reply.
Events in the campaign-map-events (Timed,Triggered,Continuous,Placed) cannot select armies, so a lot of commands like "change owner", "give creatures" are unavailable. They can however trigger such an existing event from armies we edited.
As the two of you said, it is not hard to kill the armies the purple creates by itself but i thought that plot wise it was even better if some remained purple. (I am trying to make a campaign with a lot of influence from our choice on the plot and game play).
The basic idea is we are a tribe of barbarians who lost the power struggle and fled to the south, among the routes we can take is trying to make an alliance with the purples (life) against the other barbarians in the north.
For the purple, if they aren't able to beat us very fast they would have to fight on 2 fronts which might not be the wise choice, therefore they chose to have an alliance with us and becoming the blue people. However we used to raid the purple before the story started, so I think it is logic if some of the armies of purple doesn't want to have an alliance with us.
Btw is there a way to display a variable?
I have a variable for Food, which affects the stats of my troops, i can show known value like how much I add to it, however I don't see how i could display the amount I currently have without a loop event that checks from 0 to the number of the ressource.
It isn't hard to script just seems stupid if there is a way to directly display it.
____________
|
|
Zense
Tavern Dweller
|
posted July 04, 2021 11:32 AM |
|
|
No problem! I found much help from these forums when learning how to make maps myself especially since many things aren't explained or readily understandable just from the campaign editor.
IamNotHelping said:
For the purple, if they aren't able to beat us very fast they would have to fight on 2 fronts which might not be the wise choice, therefore they chose to have an alliance with us and becoming the blue people. However we used to raid the purple before the story started, so I think it is logic if some of the armies of purple doesn't want to have an alliance with us.
I see. You could still only have that triggerable event happen on some of the armies and some of them not, but I'm not sure how scripted you want this to be. If you want there to be some sort of variation to how many armies want to turn into your ally you could always make it depend on a randomly generated number. For example every day you generate a random number between 1 to 4 and if it is 1 on the day you decide to have them as your ally then this and that army turns purple, while if it is 2 then these other armies turn purple.
In the end it sucks not being able to target a specific army like you intially requested so thinking outside the box is often necessary or coming up with compromises that sort of accomplish the same goal.
IamNotHelping said:
Btw is there a way to display a variable?
I have a variable for Food, which affects the stats of my troops, i can show known value like how much I add to it, however I don't see how i could display the amount I currently have without a loop event that checks from 0 to the number of the ressource.
It isn't hard to script just seems stupid if there is a way to directly display it.
Sadly I've only come up with the way you just described myself when I've tried to do the same. It would have been much easier if you could just make one single script that every day displays the current value of a variable.
|
|
IamNotHelping
Hired Hero
|
posted July 04, 2021 12:05 PM |
|
|
Zense said:
Sadly I've only come up with the way you just described myself when I've tried to do the same. It would have been much easier if you could just make one single script that every day displays the current value of a variable.
The least stupid way i can imagine, coding a 30 level tree of if then else is out of question is to ask the player's cooperation.
Everyday i ask the question
Look at your gold, are you ready?
Then with a counter loop (triggerable event) I add the number of the ressource into the gold.
Ask him if he can make the substraction of the 2 amount of gold, reduce the gold from the amount of ressources to return to the original level.
Edit:
Nvm, we cannot see the steps of the events.
I mean that if you are in a sequence of events, your amount of gold would only change after the whole event ended. So we either have to have 2*"kind of ressources" timed event if we want to do a substraction. Or we send 1 message each time the counter goes up.
The player only has to count the number of messages to close and he will know how much of that ressource he has.
Tbh, if I did the 30 level if else tree, I would be done atm but that hurts my pride lol.
____________
|
|
Zense
Tavern Dweller
|
posted July 04, 2021 01:16 PM |
|
|
IamNotHelping said:
Tbh, if I did the 30 level if else tree, I would be done atm but that hurts my pride lol.
Yeah I know how that feels. In my map I only had to make one up to 4 levels so it wasn't too bad.
Maybe try iliveinabox05's advice and try H4 Advanced Options Map Editor. I think it facilitates script making and copying if you learn how to use it.
|
|
IamNotHelping
Hired Hero
|
posted July 04, 2021 01:23 PM |
|
|
Zense said:
IamNotHelping said:
Tbh, if I did the 30 level if else tree, I would be done atm but that hurts my pride lol.
Yeah I know how that feels. In my map I only had to make one up to 4 levels so it wasn't too bad.
Maybe try iliveinabox05's advice and try H4 Advanced Options Map Editor. I think it facilitates script making and copying if you learn how to use it.
I am having troubles installing it... it seems I have a problem with java. I am on a 64 bit system with intel, so i tried to install both the x64.exe and i586.exe version of java, i couldnt open the application in both cases.
Edit: at the moment I am regreting very much to have implemented all the events regarding this additional ressource on my protagonist. Since i was planning to play the campaign mainly with 1 army, her army is the only one affected by this additional ressource. So if I were to delete her by mistake...
Now that I already did 30 level tree for the first ressource I really dont wanna mess up. I still gotta do another 30 level tree for the second ressource.
Does anyone know how to code things through the txt file? It seems that you can export and import txt files, however changes in the txt files not always lead to change in the editor.
Edit2: Finally done...
____________
|
|
Zense
Tavern Dweller
|
posted July 04, 2021 02:17 PM |
|
Edited by Zense at 14:18, 04 Jul 2021.
|
Why don't you just ctrl+c on the hero and make a copy with ctrl+v? All scripts will be copied with the hero. You can even save paste the hero on a different map you have open with the editor.
As for the program I only have experience with Heroes 4 map generator so far so I can't help you with running it.
|
|
IamNotHelping
Hired Hero
|
posted July 04, 2021 02:33 PM |
|
|
Zense said: Why don't you just ctrl+c on the hero and make a copy with ctrl+v? All scripts will be copied with the hero. You can even save paste the hero on a different map you have open with the editor.
Thanks! I thought that would only be possible if I could use the Advanced Editor.
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted July 04, 2021 06:24 PM |
|
|
Fear not, I have already scripted a way to display the value of different variables!
You're on the right track, you can use the resource panel to show these values.
I'll need to take a look to remind myself, but in the campaign I was working on a while back, you have custom abilities that you put points into, and I display the number of points you have in each skill using the resource panel.
Basically, you save the value of each resource, then reduce them to 0 (I have scripts for this).
Then, you just populate them with the value of each of your variables (I have scripts for this).
After you've done what you want, then you run scripts to reduce the resource values to 0, and then set them back to the previous resource values.
You will absolutely want the advanced options editor for this, as these scripts are actually contained with the app. You just have to copy and paste the utility scripts into your map, and then you can use them.
Let me take a look at exactly what scripts and how I use them and I'll get back to you as soon as I can (I'm about to go on an almost 4 hour drive, so it might be a bit before I get back to you).
|
|
iliveinabox05
Honorable
Famous Hero
|
posted July 04, 2021 06:36 PM |
|
|
Oh, and it looks like if you're using Equilibris, you can use syntax like this in display events to show you the value of a variable:
($(tarnumNewPoints))
Where "tarnumNewPoints" is the name of a numeric variable. Shouldn't need the outside parentheses, I may have just put that to make the number easier to see within the text. I also don't think I've actually tested it out, but I don't think I would have scripted it if it wasn't known to work!
|
|
|
|