-
Contributor
How to custom the radius of a Decorator?
I'm creating a new plugin, but I don't know how to customize the radius of a Decorator.
This custom code is always invalid. I need to allow users to modify the radius.
Hud.GetPlugin<GLQ_CursorOnMonster>().Radius = 15;
GLQ_CursorOnMonster.cs - Pastebin.com
Another question, how should I judge whether I am in plot mode or adventure mode?
I am planning to create an achievement timer for users, because there is an achievement that needs to be completed in A1-A5 within 1 hours.
-
Contributor
your Radius Variable is only used once in the Load function. you have to call the Load function again after the radius was modified.
for campaign/story mode:
only thing i can think of is using the Hud.Game.Quests and see if any of the contained quests is a storymode quest. if thats true, you can probably assume youre in story mode.
thats a lot of work though because you have to identify all the story quests
Last edited by prrovoss; 05-11-2018 at 04:43 AM.
-
Savvy ? 🐒
As Prrovoss said, Load is executed only once, there is a version of your plugin doing what you want as an example : GLQ_CursorOnMonster.cs . GitHub
About Story mode, take a look at IQuest.Type :
PHP Code:
public enum QuestType
{
MainQuest = 0,
Event = 2,
Challenge = 4,
Bounty = 5,
Unknown1 = 7,
Unknown2 = 8,
Unknown3 = 9,
}
To be checked but I think 'MainQuest' is from the story mode.
-
Contributor
Originally Posted by
JackCeparou
As Prrovoss said, Load is executed only once, there is a version of your plugin doing what you want as an example :
GLQ_CursorOnMonster.cs . GitHub
About Story mode, take a look at IQuest.Type :
PHP Code:
public enum QuestType
{
MainQuest = 0,
Event = 2,
Challenge = 4,
Bounty = 5,
Unknown1 = 7,
Unknown2 = 8,
Unknown3 = 9,
}
To be checked but I think 'MainQuest' is from the story mode.
I know you'll answer me
Thanks very much
-
Contributor
Originally Posted by
JackCeparou
As Prrovoss said, Load is executed only once, there is a version of your plugin doing what you want as an example :
GLQ_CursorOnMonster.cs . GitHub
About Story mode, take a look at IQuest.Type :
PHP Code:
public enum QuestType
{
MainQuest = 0,
Event = 2,
Challenge = 4,
Bounty = 5,
Unknown1 = 7,
Unknown2 = 8,
Unknown3 = 9,
}
To be checked but I think 'MainQuest' is from the story mode.
I still don't know how to judge the story mode:gusta:
-
Contributor
Originally Posted by
SeaDragon
I still don't know how to judge the story mode:gusta:
[C#] using Turbo.Plugins.Default; namespace Turbo.Plugins.Prrovoss { publi - Pastebin.com
IsStoryMode2 seems to be correct
-
Post Thanks / Like - 1 Thanks
SeaDragon (1 members gave Thanks to prrovoss for this useful post)
-
Contributor
Originally Posted by
prrovoss
YES,IsStoryMode2 is working
-
Contributor
Originally Posted by
prrovoss
The bad thing is that it may not be judged as a story mode in some scenes.
For example,The scene of A5 kill Malthael
I think maybe there are other scenes with the same problem.
https://www.ownedcore.com/forums/dia...modetimer.html
-
Contributor
There are also Event type quest in story mode, which results in false return.
In the same way, there are Main quest in the adventure mode,
It's terrible.
Edit:
I thought of a stupid way to judge the story mode 1 times in a game. It seemed to be effective. I played the whole A1-A2 completely.
Last edited by SeaDragon; 05-13-2018 at 08:14 AM.
-
Savvy ? 🐒
This seems to work :
PHP Code:
using System.Linq;
//snip....
public bool IsStoryMode { get { return Hud.Game.SpecialArea == SpecialArea.None && !Hud.Game.Bounties.Any(); } }
public bool IsAdventureMode { get { return Hud.Game.Bounties.Any(); } }
Another way to use it : SampleStoryPlugin.cs . GitHub
Last edited by JackCeparou; 05-13-2018 at 12:52 PM.
-
Post Thanks / Like - 1 Thanks
SeaDragon (1 members gave Thanks to JackCeparou for this useful post)
-
Contributor
Originally Posted by
JackCeparou
This seems to work :
PHP Code:
using System.Linq;
//snip....
public bool IsStoryMode { get { return Hud.Game.SpecialArea == SpecialArea.None && !Hud.Game.Bounties.Any(); } }
public bool IsAdventureMode { get { return Hud.Game.Bounties.Any(); } }
Another way to use it :
SampleStoryPlugin.cs . GitHub
You have a better solution every time
Thank you