MCBICK'S PROFILE
McBick
1339
Search
Filter
[RM2K3] DynRPG Compiling Error
author=CherrySo basically it is my compiler that is the issue then. I have used int values instead of enum values before and I have never had this issue before which is why I thought it was something else.
According to your compiler error and PepsiOtaku's docs `RPG::SkillType` (an enum) is the type of the `RPG::Skill::type` member. You are assinging an integer and not an `RPG::SkillType` value (which would be something like `RPG::SKILL_SWITCH`), and the compiler doesn't like the implicit conversion there, so you have to do an explicit conversion.
[RM2K3] DynRPG Compiling Error
author=Cherry
It's just an explicit cast to the enum type.
I was hoping to understand what RPG::SkillType is and why do I need to cast it? Why can't I just set the value?
@Kazesui
Do you think I could take a look at the source code of your dynmodeseven plugin? I would like to learn how to manipulate bitmaps in c++ next and possibly create more advanced plugins.
[RM2K3] DynRPG Compiling Error
author=CherryCould you explain how that works? I'm still learning c++. I am guessing (RPG::SkillType) converts the right value to an object or pointer type?RPG::skills[1]->type = (RPG::SkillType)5;
[RM2K3] DynRPG Compiling Error
author=Cherry
What error message do you get? The code doesn't look correct in the first place because I guess it needs to be `RPG::skills` and not `RPG::Skills`.
(Also while doing something like that, keep in mind it's not saved and loaded, unless you implement that yoursave in hooks. It will stay until you close the game, regardless of saving or loading, and won't be restored next time.)
I have it as RPG::skills in my code, typo in my post. The error is:
RPG::skills[1]->type = 5; //invalid conversion from 'int' to 'RPG::SkillType' [-fpermissive]
I am trying to modify skills during gameplay. I am only experimenting now to see how far I can take it.
[RM2K3] DynRPG Compiling Error
Can someone explain how I can change the following value without an enum?
class Skill { public: SkillType type; //what is this object, doesn't seem to be static or an int? ...
//Something like this works... RPG::skills[1]->type = RPG::SKILL_NORMAL; //But this doesn't... RPG::skills[1]->type = 5; //to access subsets you need to use 4 or higher. //invalid conversion from 'int' to 'RPG::SkillType' [-fpermissive]
[RM2K3] DynRPG Compiling Error
author=CherryI did resolve it, but I did so by rewriting the code and getting lucky. This is very helpful to know as I have run into this issue in another plugin I am working on. I had a hunch that it was the variable initialization, but wasn't sure. Thanks to this information, I should be able to avoid this issue completely in the future now.
I guess this is already solved, but I just wanted to say that the error 1114 is an actual Windows error code and it means "A dynamic link library (DLL) initialization routine failed" which means that the DllMain function (which the compiler usually generates) returned FALSE. Either some misconfiguration with the compiler, or you have some global variables that are getting initialized with things that don't yet exist when the library is loaded, for example if you try to create some game objects before onInitFinished (the engine hasn't started yet).
[RM2K3] DynRPG Compiling Error
That is the route I was going to go, but instead create image copies of each cel in the animation and play it like it would in the animation database. This would take a bit of work to get right as I have to copy only part of the battle animation image which means I have to figure out an algorithm to determine the size of the cel for each cel of the image file.
I'm not sure how taxing it would be to create so many Image class objects either. I can't just use one for the entire animation as you can only draw an Image object in a limited time frame, although I would have to test it to see how limited that time frame is. Ideally I would only use one Image object and just copy the cel properties to it and draw it on screen, but I'm not sure if that would work for the aforementioned reasons.
I'm not sure how taxing it would be to create so many Image class objects either. I can't just use one for the entire animation as you can only draw an Image object in a limited time frame, although I would have to test it to see how limited that time frame is. Ideally I would only use one Image object and just copy the cel properties to it and draw it on screen, but I'm not sure if that would work for the aforementioned reasons.
[RM2K3] DynRPG Compiling Error
author=KazesuiThat is what I have been using them for, but it is weird to me that I don't have to define them as an int, string, or elsewise.
enums are generally there to store named states or specific values which would be cryptic to keep track of between multiple programmers for a common code base.
Do you know if there is a way to play animations from DynRPG, specifically during battle? This is the only thing I can find for playing animations in battle:
RPG::AnimationInBattle->isAnimationPlaying = true; RPG::AnimationInBattle->currentAnimationId = n;
[RM2K3] DynRPG Compiling Error
As I thought, there is only that way. The problem with using the game's variables or hero database to store the values is that there is no way to know if the game maker will use them and also the number of values stored is not a fixed number, it depends on the plugin user's amount of heroes used.
@Kazesuu
I have been using enumerators and I am confused why I don't have to define it as a string, int, or other? Some how the compiler knows what it is when I am using the values. Why is this?
@Kazesuu
I have been using enumerators and I am confused why I don't have to define it as a string, int, or other? Some how the compiler knows what it is when I am using the values. Why is this?
[RM2K3] DynRPG Compiling Error
Is there an easy way to save variables into the game itself? I am working on a plugin that extends the number of stats each hero has, but every time I shut down the game the new stats are reset. The values are stored in global variables in the plugin. I could save them to the DynRPG ini file and have them read at start up, but is there an easier way than this?













