Jump to content


Photo

Farms Gain Experience from Recruiting Units Problem


Best Answer Miraak5, 27 June 2019 - 12:19 PM

Ofc you can fix it because bfme2 structures don't give any XP when you recruits units and farms in bfme1 didn't got XP when recruiting peasants
in the Gondor Farm object you have this
 

    Behavior = ProductionUpdate ProductionUpdateModuleTag
        ; GiveNoXP                       = Yes  ;disable granting xp when producing units.
    End

enable the GiveNoXP line

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 OneV

OneV
  • Members
  • 53 posts

Posted 26 June 2019 - 10:42 PM

Hi,

I am currently working on Rohan faction. I included peasants and peasant archers into the farm so that the units could be built from there. However, there is a problem with that because these units give experience to the farms which makes the farms level up much faster. I was wondering if someone could suggest how I could go about resolving this problem. I was thinking of setting experience gained by the farms from the units as 0, but I cannot find the code that would be responsible for it. I would appreciate any help. 

 

I see line such as this one 

ROHAN_FARM_LVL2_EXP_NEEDED            2000  

or such as this one

ROHAN_STABLES_LVL2_EXP_NEEDED            2000

Taking this as an example, I would need to build 5-7 Rohirrim troops to gain the experience needed. This tells me that a battalion is valued at around 300-400 of experience each. This means that every unit must have a certain amount of experience that they give to the building that produces them. This means there must be a way to change that amount of experience for peasants.


Edited by OneV, 26 June 2019 - 11:44 PM.


#2 Super Hippo

Super Hippo
  • Members
  • 29 posts

Posted 26 June 2019 - 11:14 PM

For BFME1, the gained experience is the amount of resources you spend to recruit the unit. The exception is the orc warrior which is build for free but still has a internal cost of 100 so it levels up the orc pit. I guess it is handled in a similar way in BFME2.

I don't know how you could separate the cost from the gained experience other than making a unit completely free.



#3 OneV

OneV
  • Members
  • 53 posts

Posted 27 June 2019 - 03:16 AM

For BFME1, the gained experience is the amount of resources you spend to recruit the unit. The exception is the orc warrior which is build for free but still has a internal cost of 100 so it levels up the orc pit. I guess it is handled in a similar way in BFME2.

 

Great insight! I checked and you are absolutely correct. The higher the recruiting cost is, the more experience structures get. 
I wish there was another way to fix this. Thank you so much! 



#4 Miraak5

Miraak5

    title available

  • Members
  • 389 posts
  • Location:France
  • Projects:ROTWK Patch 2.02, Wars of the North, BFME1 1.08 Complete Edition
  •  BIG coding, Map scripting and AI coding

Posted 27 June 2019 - 12:19 PM   Best Answer

Ofc you can fix it because bfme2 structures don't give any XP when you recruits units and farms in bfme1 didn't got XP when recruiting peasants
in the Gondor Farm object you have this
 

    Behavior = ProductionUpdate ProductionUpdateModuleTag
        ; GiveNoXP                       = Yes  ;disable granting xp when producing units.
    End

enable the GiveNoXP line


He was the first...


#5 OneV

OneV
  • Members
  • 53 posts

Posted 27 June 2019 - 03:01 PM

    Behavior = ProductionUpdate ProductionUpdateModuleTag
        ; GiveNoXP                       = Yes  ;disable granting xp when producing units.
    End

I was looking for something like this, but couldn't find it. That's great! I already checked and it works for the farms as well. Exactly what I needed. Thank you!






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users