Jump to content


Photo

GiveNoXP... or?


  • Please log in to reply
28 replies to this topic

#21 Gourbish

Gourbish
  • Members
  • 149 posts
  • Location:France

Posted 22 December 2012 - 09:47 PM

Hi Nazgûl,

I've just tried to do your stuff : being able to upgrade structure to level 2 with a button AND/OR earning XP when buying units to level up. With a choice for the different prices for that.

On the vanilla, there is the only thing you have to do :
In the GoblinCave, you have this behavior :
Behavior = ProductionUpdate ProductionUpdateModuleTag
    ConstructionCompleteDuration  = 250 ;in mSeconds   wait time so if you have multiple units they don't run over each other
    VeteranUnitsFromVeteranFactory  = No ;I am higher than my default level, I will give a free level to those I produce 
    GiveNoXP	   = Yes   ;trying to disable granting xp when producing units.
    BonusForType	  = GoblinFighterHorde
    SetBonusModelConditionOnSpeedBonus = Yes ; set the UPGRADE_ECONOMY_BONUS if there is any production bonus
End

You only have to set "GiveNoXP" from "Yes" to "No" to activate the fact that producing unit will give XP to the structure.
After that, all is working.

For example I tried that :
In gamedata :
#define GOBLIN_CAVE_LVL2_EXP_NEEDED   200 ;;2400
#define GOBLIN_CAVE_LVL3_EXP_NEEDED    400 ;;4800
By default :
  • GoblinFighter cost 80
  • GoblinArcher cost 250
  • upgrading from level 1 to 2 cost 100.

-> After that I tested this on a GoblinCave:
I bought 3 GoblinFighter to level up to level 2 (3 x 80 = 240 > 200 needed), and 2 GoblinFighter to level up to level 3 (2 x 80 = 160 + 240 = 400 = 400 needed).
Finally I spent 400 to have a Goblin cave level 3.

-> And I tested that too on another GoblinCave:
I bought the upgrade to level 2, and I bought 2 GoblinArchers to level up to level 3 (250 + 250 = 500 > 400 needed).
Here I spent 600 to have a Goblin cave level 3.

I didn't have to change anything like CommandSetUpgrade, ExperienceLevels.INI or LevelUpUpgrade. ONLY WHAT I SAID.

I hope it will work good for you.

#22 Nazgûl

Nazgûl

    S.E.E. Team Leader

  • Hosted
  • 10,582 posts
  • Location:Sweden
  • Projects:BFME2 - Nazgûl's Special Extended Edition
  •  Veteran

Posted 22 December 2012 - 11:14 PM

Thanks, but not sure we're on the same page here <^_^

Edited by Nazgûl, 22 December 2012 - 11:16 PM.

// C}{riZpc_punch.gif
"Do not come between the Nazgûl and his mod!"
SEE_Banner_2008.jpg
SEE-Team_Leader.jpg
----------------------------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>>>>>>>> I S.E.E. YOU! <<<<<<<<<<<<<<<<<<<<<<<
----------------------------------------------------------------------------------------------------


#23 Gourbish

Gourbish
  • Members
  • 149 posts
  • Location:France

Posted 22 December 2012 - 11:27 PM

It does what you want : having choice for levelling up a building. On one hand you can use production experience, and on the other hand you can buy the upgrade. And you're able to choose the cost of each thing.
It's not what you wanted to do ?

#24 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 22 December 2012 - 11:33 PM

That's what he already has :)
Problem is:
Upgrade is 5k
Struct need 4k exp
Gives 1k extra xp
While it shouldn't ;)
Ridder Geel

#25 Gourbish

Gourbish
  • Members
  • 149 posts
  • Location:France

Posted 22 December 2012 - 11:40 PM

That's what he already has :)
Problem is:
Upgrade is 5k
Struct need 4k exp
Gives 1k extra xp
While it shouldn't ;)

I don't understand you...

#26 Gourbish

Gourbish
  • Members
  • 149 posts
  • Location:France

Posted 22 December 2012 - 11:50 PM

Well everything works... almost... :evgr:
Aparently I was a tad to quick in testing, so there is still one thing I can't get in order, but maybe it's not even possible? Preferably I'd like to ba able to set ANY cost of the manual upgrade of these unit producing structures. But from what I gather in testing, the cost of the manual upgrade has to match the cost of the XP upgrade - exactly. So if it requires 8 hordes of $100 each ($800 total), the cost of the manual upgrade to lvl2 has to be $800. I thought I could change that in the process, but aparently I couldn't after all. So it all works, just not as widely editable as I would like. It would be rather logical to set a much higher cost of the manual upgrade since it's so much faster... but meh, maybe it's not possible.


In my example, I explain that it is possible to need $200 of XP production to upgrade to level 2 or to buy the upgrade for $100. So it's not the same cost, isn't it ? Or I'm totally crazy..... :p

#27 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 23 December 2012 - 01:47 AM

No, but that's not what the problem is.
The problem that WE are having is, when you want to make the player pay more for the upgrade than is required for the level up the structure gets extra experience, which is not what is desired...

Edited by Ridder Geel, 23 December 2012 - 01:47 AM.

Ridder Geel

#28 Gourbish

Gourbish
  • Members
  • 149 posts
  • Location:France

Posted 23 December 2012 - 11:43 PM

Hum... ok...
I didn't think that the problem was only when the cost of the upgrade is greater than the cost of production experience.

I understand more now...

I tried that :
XP needed to level 2 : 200
XP needed to level 3 : 400

Upgrade for level 2 : 500

When buying the upgrade for 500, the cave is directly levelled up to..... level 3 !
When levelling up with experience, it works good.

I see the problem ! :thumbsupdrool:

Edited by Gourbish, 24 December 2012 - 12:03 AM.


#29 Nazgûl

Nazgûl

    S.E.E. Team Leader

  • Hosted
  • 10,582 posts
  • Location:Sweden
  • Projects:BFME2 - Nazgûl's Special Extended Edition
  •  Veteran

Posted 24 December 2012 - 12:35 AM

There you go :mellowthumbsup:

// C}{riZpc_punch.gif
"Do not come between the Nazgûl and his mod!"
SEE_Banner_2008.jpg
SEE-Team_Leader.jpg
----------------------------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>>>>>>>> I S.E.E. YOU! <<<<<<<<<<<<<<<<<<<<<<<
----------------------------------------------------------------------------------------------------





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users