Page 1 of 1

How can u get a unittype to cost more?

Posted: Wed Mar 06, 2013 8:34 am
by Stefdinho
How can u get a unittype to cost more gold? f. eks crossbow.

Re: How can u get a unittype to cost more?

Posted: Thu Mar 07, 2013 9:23 pm
by Sexacutioner
ok i really expected that someone else would have posted by now, but what you need is a trigger to do what you want, and its always best if you figure the trigger out on your own, i know what you need, but finding it yourself is wha tyou really need to do, its fairly simple, but if you keep having problems with it then post here again with your email and ill send you the way to do it, but if you post right after i do this then i wont, you HAVE to find it on your own, it will make you so much better at scen building rather than getting the answers from everyone else

build it yourself or forget it, you have the means, just implement them

Re: How can u get a unittype to cost more?

Posted: Thu Mar 07, 2013 10:52 pm
by Arntzen
he has been trying for days.. Just say how it's done please. Both me and him know the basics, we're just stuck at this.

Re: How can u get a unittype to cost more?

Posted: Thu Mar 07, 2013 11:35 pm
by Sexacutioner
you have to set a limit for gold in hand <--- # 1 hint

its easy to figure out, i dont like giving ANYTHING away, it so much more fun to find it on your own


if you have this and click on this then this is gone and you get this <---- its a very basic trigger

Re: How can u get a unittype to cost more?

Posted: Fri Mar 08, 2013 3:21 am
by Arntzen
Sexacutioner wrote:you have to set a limit for gold in hand <--- # 1 hint
I've no idea what you're talking about.
Sexacutioner wrote: its easy to figure out, i dont like giving ANYTHING away, it so much more fun to find it on your own
if you have this and click on this then this is gone and you get this <---- its a very basic trigger
I've also tried now and couldn't figure it out. Maybe it's very easy and basic, in that case we've missed something. It's not very constructive of you to tell us (who have tried) that it's easy and we should try more.
I frankly don't care if you "like" to give something away or not, and that is not what this is about.

So with all due respect, either tell how it's done or don't answer this topic. What you've done so far has only caused confusion and discouragement instead of clarity and encouragement.

Re: How can u get a unittype to cost more?

Posted: Fri Mar 08, 2013 11:02 am
by Sexacutioner
>.< ill have to get in the scen editor and find out how to do it again, its been bout 4 years since ive built any scens

Re: How can u get a unittype to cost more?

Posted: Fri Mar 08, 2013 1:32 pm
by Stefdinho
I will be very thankful if you did (:

Re: How can u get a unittype to cost more?

Posted: Sat Mar 09, 2013 4:00 pm
by Sexacutioner
i think i been kind of misunderstanding you guys lol

if what your trying to do is get them to cost more by selecting the actual hot key or button to build then you need a hex editor for that and it changes game version


use objects placed in the scen to use as build buttons then place the cost and unit that will be built, have to set the trigger on looping and place condition for 2 seconds that way it doesnt eat through your resourses super fast
when doing it you need to rename units on the map like " clubman 200f/g " and things like that so people know the cost and what they are building
if its one that advances through the ages then you need to set up remove and add triggers for units so you dont clutter up your shit with crap you can no longer even really use

i thought there was also a way to keep the upgrade buttons up at all times while removing all the units themselves and you could use those upgrade buttons to build units but im doing something wrong with that one because i havent messed with this shit in a long time

ill work on it some more when i have more time to really do something with it

Re: How can u get a unittype to cost more?

Posted: Thu Sep 12, 2013 9:27 am
by lightnessking.
Hmmm reading through this post and it is possible, however, only with 1 military building at once.
Let's say you got 1 archery range.

You can rename your crossbow to "Crossbow (X) 500 wood 500 gold "
reason for the amount of spaces is so that the ACTUAL costs (which are 100/100) are "off-screen".

However, it requires more than just one simple trigger to make this effective. Assuming you want citizens to gather the gold and wood, you'll need alot more than this.

First of all make a trigger for this:
IF (Condition= citizen holds 15 wood)
THEN: (Effect= increase player's wood by 15) AND (Effect= increase player's variable0 by 15)
AND (Effect= decrease citizen wood by 15)

Note: If the settlement is owned by the same player, he/she will be able to abuse this by force feeding.

Same goes for gold, except use variable1 instead of variable0

The next thing you want to do is.

IF (Condition= archery range is selected by player) AND (Condition= player's wood <= player's variable0) AND (Condition= player's gold < player's variable1)
THEN (Effect= remove 400 wood) AND (Effect= remove 400 gold) AND (Effect= remove 500 Variable0) AND (Effect= remove 500 Variable1)

Why? Because they already paid 100 wood/gold, and you want them to pay 400 extra to make it 500.
The problem you WILL encounter is, what if players decide to cancel the crossbow? You will need to make the exact same triggers, but reverse them. (if wood > variable0 and gold > variable1 then give player 400 wood/gold and 500 var0/var1)

Now you probably wonder, what if the player holds shift while buying crossbow units.
Well, then you're fucked. He just made 5 crossbow units for the same price as one.
There are very advanced ways and systems to make it work, but it requires alot of triggers that eventually it's not worth the time if you compare the invested time to the received results.
(But! If you manage to get such systems work, it's most likely you can also allow multiple military buildings at once, rather than just one.)

Hence why implementing such thing in a "real" game is impossible to get bug-free. As sexacutioner suggested, make a unit on the map, and have people select that unit in order to buy them. (you can set the spawn at a fixed location, or for example as they've done in the scenario Journey, spawn them in the LOS of your hero.)

Note: having units spawn in LOS can be bugged, think about unaccesable mountains and gaps in forests. There is a chance units will spawn there, and get trapped.

Easy fix for this is setting the LOS of a hero to 1-2