Jump to content


Photo

repair for laborer worker & peasant


  • Please log in to reply
13 replies to this topic

#1 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 24 July 2016 - 07:19 PM

hi i have tried to restore the repair for peasant & orc laborer

but i have a problem the cursor is invalid if i try to select a building to repair it


He was the first...


#2 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 04 August 2016 - 04:07 PM

What does the unit code look like? And have you compared it to BFME 1 code (where it worked if i'm not mistaken?)?


Ridder Geel

#3 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 02 September 2016 - 12:00 AM

this 

 

 
Behavior = RepairSpecialPower ModuleTag_RepairSPecialPower
SpecialPowerTemplate      = SpecialRepairStructure
End
 
and this
 
Behavior = WorkerAIUpdate ModuleTag_10
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
RepairHealthPercentPerSecond = 0.2%    ; % of max health to repair each second
AILuaEventsList = StandardPeasantFunctions
AttackPriority = AttackPriority_Infantry
SpecialContactPoints   = Repair
End
 

and this button in the commandset

 

 
CommandButton Command_Repair ;?????
Command = SPECIAL_POWER
SpecialPower            = SpecialRepairStructure
Options = OK_FOR_MULTI_SELECT NEED_TARGET_ALLY_OBJECT ;CONTEXTMODE_COMMAND
ButtonImage = UCCommon_Repair
TextLabel               = CONTROLBAR:RepairStructure
    CursorName              = DoRepair
    InvalidCursorName       = GenericInvalid
DescriptLabel           = CONTROLBAR:ToolTipRepairStructure
ButtonBorderType = ACTION
InPalantir = Yes
End
 
I know it works for BFME2 as I have used it in my mod 


#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 03 September 2016 - 08:56 AM

i have the same code thats not work for me :( (the cursor is still invalid)


He was the first...


#5 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 04 September 2016 - 08:53 PM

KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE MELEE_HORDE DOZER SWARM_DOZER 
 
 
add  DOZER SWARM_DOZER 
 to the kindof of the unit code .


#6 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 05 September 2016 - 03:26 PM

i have already do that :(


He was the first...


#7 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 04 March 2017 - 02:19 PM

finally i get the cursor to appear with the peasant, but when i select a building to repair the peasant just not move/do nothing


He was the first...


#8 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 04 March 2017 - 03:22 PM

Is it a single peasant or is he in a horde? It might be the horde code that could be interfering?


Ridder Geel

#9 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 04 March 2017 - 03:23 PM

it's an horde like bfme1

but also it's strange but i still cant get the cursor working for the laborer


He was the first...


#10 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 14 March 2017 - 12:18 PM

Did you place the code in the unit or in the hordes?


Ridder Geel

#11 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 14 March 2017 - 04:32 PM

for the peasant they have the repair special power code in horde and unit, they have dozer and swarm_dozer in kind of for horde and unit and the unit have the worker behaviour

but they still not move to repair the selected damaged building :(

and the cursor is still invalid for orc laborer :(


He was the first...


#12 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 March 2017 - 05:28 PM

So what does your code look like?


Ridder Geel

#13 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 22 March 2017 - 06:36 PM

for peasant (for laborer it's the same code except i scrap the horde one because laborer it's a single guy)

 

this in horde and unit

 

Behavior = RepairSpecialPower ModuleTag_RepairSPecialPower
SpecialPowerTemplate      = SpecialRepairStructure
End
 
this in unit kind of
 PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE THROWN_OBJECT DOZER SWARM_DOZER GRAB_AND_DROP
 
this in unit
 
    Behavior = WorkerAIUpdate ModuleTag_10
        AutoAcquireEnemiesWhenIdle        = Yes ATTACK_BUILDINGS
        RepairHealthPercentPerSecond    = 0.2%    ; % of max health to repair each second
        AILuaEventsList                    = StandardPeasantFunctions
        AttackPriority                =     AttackPriority_Infantry
        SpecialContactPoints           = Repair
    End
 
and this for horde kind of
SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE MELEE_HORDE NOTIFY_OF_PREATTACK ARMY_SUMMARY LARGE_RECTANGLE_PATHFIND SWARM_DOZER DOZER //UNATTACKABLE
 

He was the first...


#14 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 08 April 2017 - 03:44 PM

Make sure that your horde has this (you mention the unit has an update with the repair) :

    Behavior = HordeWorkerAIUpdate ModuleTag_HordeAIUpdateNew
        AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
        MoodAttackCheckRate        = 500
        MaxCowerTime                =    5000
        MinCowerTime                =    3000
        AILuaEventsList                = StandardPeasantFunctions 
        AttackPriority                =     AttackPriority_Infantry
        SpecialContactPoints           = Repair
    End

    Behavior = RepairSpecialPower ModuleTag_RepairSPecialPower
        SpecialPowerTemplate      = SpecialRepairStructure
    End  

Ridder Geel




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users