A script to learn: Difficulty System

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
One reason for making it a separate feature / separate script is because :

It is no longer a parameter script, it is an enemy AI script. ;)
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I think if it is just for yourself and for practice, a separate script would not be needed. But if you want to share it with others, from what I've seen so far, most like it being a separate script just so they can pick and choose the scripts they want in the game.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Even if it's just for yourself, you should practice writing modular code.


People say "I'll do it when the time comes" but when the time comes they just do whatever they're comfortable with.
 
Last edited by a moderator:

Bloodmorphed

Dungeon Fanatic
Veteran
Joined
Sep 17, 2012
Messages
1,466
Reaction score
144
First Language
English
Primarily Uses
Even if it's just for yourself, you should practice writing modular code.

People say "I'll do it when the time comes" but when the time comes they just do whatever they're comfortable with.
Good point. But even still I don't have a lot of time on my hands, you know... one month challenge and all. But it won't be for me. When I start doing more complicated scripts then they may be just for me, but simple stuff like this, no real reason to keep it for myself.
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
I agree with what Tsukihime said. It'll also make editing your script later MUCH easier if things are modular
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Good point. But even still I don't have a lot of time on my hands, you know... one month challenge and all. But it won't be for me. When I start doing more complicated scripts then they may be just for me, but simple stuff like this, no real reason to keep it for myself.
That is exactly the reason why a lot of people decide to write code that may not be very manage-able.


"I've got a deadline in 72 hours, I don't have time to think about how to write it in a very good way!"


And then they just throw something together that works...


And you feel sorry for the next guy that has to take over.
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
"I've got a deadline in 72 hours, I don't have time to think about how to write it in a very good way!"

And then they just throw something together that works...
^ This.

Even people who should know better can fall into this trap.

I have always written my code in seperate script pages. Like, if I modify one class, that will go into a seperate page from all other classes that my script modifies. I do it this way on purpose, but during the IGMC I knew I was on a short time frame and didnt always stick to this rule. I now regret that as I'm trying to work my way through tidying up and optimizing the coding.

One should find a style of writing code that they like and stick to it. It will make alot of things much easier when you are looking back through your old codes.
 

Bloodmorphed

Dungeon Fanatic
Veteran
Joined
Sep 17, 2012
Messages
1,466
Reaction score
144
First Language
English
Primarily Uses
The difference is, I won't be using these scripts in the game I'm making. I also don't know how to do it yet, lol.

Lol, I am so lost!

module BLOOD  module VARIABLE    # AI_Variable will be going by the variable you want. It's default is 100    # if you are wanting to use Difficulty Settings with this make sure they are    # the same!    AI_Variable = 100  end #end variable   module DIFFICULTY    Easy = 0    Normal = 1    Hard = 2    Insane = 3  end #end difficulty   module ENEMY    Enemy_AI = /<?:DIFFICULTY|difficulty:[ ],  >/i
I'm trying to figure out how to use notetags, now Enemy_AI = /<?:DIFFICULTY|difficulty:[ ],  >/i that line is obviously it, but I'm lost on how to keep it like this:

<easy: 1, Always, 5>

so:

<difficulty: skill#, condition, rating>
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top