Difference between revisions of "Talk:AddPerk"
Jump to navigation
Jump to search
imported>Cipscis |
imported>DewiMorgan m (→Codearound: explaining more.) |
||
Line 4: | Line 4: | ||
Would a GameMode block in TokenScript with a RunOnce flag be better? Then you'd just need (Perk, Token, TokenScript). I suspect the quest is the cleanest solution for mod initialisation, since it's not checking a flag every frame, but am I wrong? Is there a better way, for any value of "better"? [[User:DewiMorgan|DewiMorgan]] 23:44, 15 April 2009 (UTC) | Would a GameMode block in TokenScript with a RunOnce flag be better? Then you'd just need (Perk, Token, TokenScript). I suspect the quest is the cleanest solution for mod initialisation, since it's not checking a flag every frame, but am I wrong? Is there a better way, for any value of "better"? [[User:DewiMorgan|DewiMorgan]] 23:44, 15 April 2009 (UTC) | ||
:Using a quest that runs a [[GameMode]] block once before calling [[StopQuest]] on itself is a good way to initialise a plugin, but I'm not really sure why you've used a token to add/remove the perk - why not just use [[AddPerk]] and [[RemovePerk]] instead of using [[AddItem]] and [[RemoveItem]] to essentially do the same thing? And how does this help with the bug of loading after removing the plugin?<br />-- [[User:Cipscis|Cipscis]] 01:08, 16 April 2009 (UTC) | :Using a quest that runs a [[GameMode]] block once before calling [[StopQuest]] on itself is a good way to initialise a plugin, but I'm not really sure why you've used a token to add/remove the perk - why not just use [[AddPerk]] and [[RemovePerk]] instead of using [[AddItem]] and [[RemoveItem]] to essentially do the same thing? And how does this help with the bug of loading after removing the plugin?<br />-- [[User:Cipscis|Cipscis]] 01:08, 16 April 2009 (UTC) | ||
:: 1) Without dropping a token, how would the player be able to trigger removal of the perk? | |||
:: 2) The bug hits when you load a game with an active-on-the-player perk that no longer has a mod to describe it. Removing the perk prior to uninstalling (in this case by dropping the token) will prevent the bug. Allegedly. [[User:DewiMorgan|DewiMorgan]] 07:21, 16 April 2009 (UTC) |
Revision as of 02:21, 16 April 2009
Codearound
Added a codearound for the bug. Not sure this is the cleanest way of doing it: it requires a minimum five base objects (Perk, Quest, QuestScript, Token, TokenScript).
Would a GameMode block in TokenScript with a RunOnce flag be better? Then you'd just need (Perk, Token, TokenScript). I suspect the quest is the cleanest solution for mod initialisation, since it's not checking a flag every frame, but am I wrong? Is there a better way, for any value of "better"? DewiMorgan 23:44, 15 April 2009 (UTC)
- Using a quest that runs a GameMode block once before calling StopQuest on itself is a good way to initialise a plugin, but I'm not really sure why you've used a token to add/remove the perk - why not just use AddPerk and RemovePerk instead of using AddItem and RemoveItem to essentially do the same thing? And how does this help with the bug of loading after removing the plugin?
-- Cipscis 01:08, 16 April 2009 (UTC)
- 1) Without dropping a token, how would the player be able to trigger removal of the perk?
- 2) The bug hits when you load a game with an active-on-the-player perk that no longer has a mod to describe it. Removing the perk prior to uninstalling (in this case by dropping the token) will prevent the bug. Allegedly. DewiMorgan 07:21, 16 April 2009 (UTC)