Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   Mods (http://forum.fulqrumpublishing.com/forumdisplay.php?f=187)
-   -   Modding creature abilities (http://forum.fulqrumpublishing.com/showthread.php?t=229464)

jorko80 10-13-2015 02:39 PM

Modding creature abilities
 
Hello , I'm working on a little mod and want to ask you how can I restrict creature abilities? The abilities must be available only when a certain condition is met. The condition I want most is - creature experience level in Red Sands, but morale, level of the hero are also good ones.

I found this for the chosha unit in addon_unit_features.lua :

function chosha_features(unit)
local i = unit
if i == nil then i = 0 end
if Attack.act_name(i)=="chosha" then
if Attack.act_size(i)> Attack.act_initsize(i)/2 then
Attack.act_enable_attack(i,"eat_all",false)
else
Attack.act_enable_attack(i,"eat_all")
end
end
return true
end

The condition here is stack size , but when I add this function for firemage's fire_shot ability it just does nothing.
Thank you!

zhoudaohan 05-22-2019 06:36 AM

You need to mod the "subturn_modificators", too.

For example, open "chosha.atom" and you will find "subturn_modificators=features_chosha"
in the "scripts" part.

CelestialOdysseyX 12-06-2023 10:17 PM

pubglitepc
 
This article delves deep into how technology shapes student learning, detailing its influence on engagement and access https://pubglitepc.com/how-does-tech...dent-learning/ to resources. It offers valuable insights into the transformative role technology plays in modern education. Informative and thought-provoking!


All times are GMT. The time now is 09:46 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.