DOING IT! - WEEK FOUR

Posts

Pages: 1
DOING IT!

Week the fourth.

DOING IT! is a community event ran each week where a prompt is given and those who wish to fulfill it post their work here. It is entirely optional, you may join at any time - even after a week has finished. Feel free to post as many pieces as you like. Feedback is encouraged.

DETAILED EXPLANATION/QUESTIONS/SUGGESTIONS HERE

RULES
- Post your work in the thread, preferably with some small explanation about it. Whether that be about any troubles you had fulfilling the prompt, how you went about it or how you think it turned out is up to you.
- Feedback is highly encouraged, but optional. No flaming please. Constructional critique is preferred. If you see a piece without feedback, consider leaving even a line about it. Keep feedback polite.
- Keep posts on/in topic. Try not to get too off-track, please.
- "Borrowing". As these threads may include both original graphical and musical creations please ask the creators instead of just adding them to your 'collections'. If authors don't mind adding full works, go ahead, but partial works are also encouraged. If someone states in their post that they do not want their work used, please try to refrain yourself from grabbing with your grubby hands. It makes you look like a fool and a thief when others' point it out. People have been given bad reputations and ostracized from communities for doing this.
- You may add to this topic at any time. A link to this and the other weekly topics to come will be added to the main topic each week. Feel free to add new work to any of them at any time.

If you have any questions, suggestions or ideas for prompts please see the
original thread.


ENJOY YOURSELVES!

PROMPT: INTO SCRIPTION
For this week, let's talk scripts and codes. Anything about them, whether it's a simple day/night system in RM2K/3, your new battle script for VX and XP or that new C++ script you just wrote up for some other maker. Let's get our scription scripts on!


Go forth and create!

Previous Topics
WEEK FOUR: INTO SCRIPTION

Marrend
Guardian of the Description Thread
21781
For a VX title that's still being hammered out, I built a Suikoden-style duel system.

I used a random number to determine what action the AI would take, then used another random number to determine what kind of hint to to relay to the player. I called a Show Choice prompt to the player to decide what the best course of action should be, given the hint, and the rock-scissors-paper mechanic of the system.

I actually had it working! The hints that were meant to cause players to input the worst possible action, given the circumstances, had the desired effect. Most of the time, anyway.

I think the only thing that is technically wrong with it is that there's no graphics/animation involved. It's all text-based. The fact that it's all text-based isn't a problem for me, but some like to see stuff happening.
Well I made a simple menu for my game as well as a battle system.



In terms of code this menu was made using the simplest syntax (Except for the HP/AP Bars) and it's mostly meant to be eye candy.



The battle system on the other hand is far more complex yet simple looking.

Inspired by a chess variant and card games, It works as a frontal battle system with an extra array of options for those who wants to use them. Not using them usually results in longer battles, but you can still survive using old RPG tactics.

Some of the options are position and defense. Positioning yourself in the right way will give you a better chance to deal a critical hit and also allow you to move farther away from your enemy so it will have a lesser chance of hitting you. Defense will allow you to place yourself in front of an ally to lower the physical damage it takes.

The enemy AI is split into 3 parts (Movement, Attention, Action ) which help it reach a decision by first checking what kind of movement it's AI allows such as defending weaker allies or focusing on attack. After it checks it's movement it will then see who is it's biggest threat(Character dealing the most damage to it). This is done by checking what kind of attention it's AI is programmed to follow, such as "kin" which checks for same enemies on the field and see who their biggest threat is, then it's combined to make a final target.

After that it will check what kind of actions it can take like healing allies or enfeebling targets (In this phase it also checks the state of it's target to prevent it from using enfeebling skills on a target on which it will have no effect).

There are many other factors that affect battle as well such as food, abilities and items, but I says to only leave a small explanation about the work.
edchuy
You the practice of self-promotion
1624
Definitely, like what I'm seeing in TDS's battle system. It seems to include some features that some others I have played in some games seem to lack: visible turn queue, stamina level to limit movement (or perhaps even actions) per turn and each enemy does its own attention calculation for the AI.

Two things I'm wondering, though: Do actions on either side have a certain range of effect? Will moving a character (enemy or ally) behind another prevent them from being targeted? Finally, the one thing that would make it a real tactical jewel were if enemies and allies could occupy any square in the grid, but that's probably asking for too much.

Also, regarding Marrend's duel system with hints, I have seen similar things in several games (even a mini-game within a game). I do like the animation, although a little message saying how much damage or if you missed helps a lot. Not getting any sort of feedback on the result of your choice would definitely make it frustrating.
post=141508
Definitely, like what I'm seeing in TDS's battle system. It seems to include some features that some others I have played in some games seem to lack: visible turn queue, stamina level to limit movement (or perhaps even actions) per turn and each enemy does its own attention calculation for the AI.

Two things I'm wondering, though: Do actions on either side have a certain range of effect? Will moving a character (enemy or ally) behind another prevent them from being targeted? Finally, the one thing that would make it a real tactical jewel were if enemies and allies could occupy any square in the grid, but that's probably asking for too much.


Thanks.


Skills like movement require stamina to use and prevent one single character from dishing out huge amounts of damage by repeating the same powerful skill. Making you rely on status effects to produce higher damage over time in most cases. Also you recover a set amount of Stamina % each turn or can use foods to speed this process up.

As for moving behind characters causing effects. Yes hiding behind a character can prevent them from being a target if the character in front of them is equipped with the cover ability. Without the ability the damage they receive will be cut in half while the damage they produce will increase the attention of both the person defending and the one being defended.

As for occupying any square in the grid... It wouldn't work since the damage and defense modifiers are based on a simple "Back", "Middle" and "Front" positions. Though it could be easily changed by merging the grids and adding a direction value to determine position and modifier, but that would mean a lot of modifications at this point.
Well, I just finished making numbers appear over enemies/the hero when receiving damage/restoration. It was surprisingly easy to implement.

I feel like I've done so much eventing for this project that it almost feels excessive. I need to make more game, less system.

I also created a small puzzle that moves blocks across great distances, and then moves back. Problem is, Rm2k3 will execute the next MOVE EVENT command before the first one is finished, as I'm sure you're all aware. So I used a loop that breaks upon a switch being turned ON, which turns on when the square has moved it's entire distance, so I don't have to time how long it takes for the block to move across the map with "Wait"s. After the loop breaks, it moves back.
It's a simple, small little thing, but I felt proud for figuring it out. Shut up.
Not to worry, it's the little work-arounds that can get you inspired and excited sometimes, narcodis. ^.^

As for me, I'm currently implementing a system in RealmS where Narissa can fletch her own arrows as long as she has the right materials. It won't be too complicated - around three or four arrow types in all (and a 'Wonky arrow' as a failure) but it will add a little more to her abilities as the arrows give different strengths/weaknesses. It'll be a case of 'this many', with randomised failure amounts and then adding the arrow type in question. Failures will depend on how good her fletching skill is.

And on the topic of wonky arrows, (XP) I'm making a little code where if said failed arrows hit the enemy (15-20% chance) it will be inflicted with 'Reassess', a condition that allows the monster to think about whether or not it's a good idea to continue fighting someone so lucky (lasts about two-four turns and has a 20% or less chance of the monster fleeing). It'll all be a case of variable checking monster intelligence and randomization.

Marrend - I've got something like that in RealmS, but instead of only three choices, there's about nine and all have varying strength. There's also no dialogue clues - you have to pay attention to the changes in sprites to guess what type of attack/defence/etc they're going to use. Those duels will be longer than usual RPS duels, so there'll be time to 'learn' the differences between sprites. That said, there'll only be four duels in RealmS - one for each main character, so yeah.

Oh and I love the look of that battle system TDS.
post=141519
I also created a small puzzle that moves blocks across great distances, and then moves back. Problem is, Rm2k3 will execute the next MOVE EVENT command before the first one is finished, as I'm sure you're all aware. So I used a loop that breaks upon a switch being turned ON, which turns on when the square has moved it's entire distance, so I don't have to time how long it takes for the block to move across the map with "Wait"s. After the loop breaks, it moves back.
It's a simple, small little thing, but I felt proud for figuring it out. Shut up.

I hear the "proceed with movement" command makes an event halt until the last move event in it finishes. Check it out, bro.
LouisCyphre
can't make a bad game if you don't finish any games
4523
post=141634
post=141519
I also created a small puzzle that moves blocks across great distances, and then moves back. Problem is, Rm2k3 will execute the next MOVE EVENT command before the first one is finished, as I'm sure you're all aware. So I used a loop that breaks upon a switch being turned ON, which turns on when the square has moved it's entire distance, so I don't have to time how long it takes for the block to move across the map with "Wait"s. After the loop breaks, it moves back.
It's a simple, small little thing, but I felt proud for figuring it out. Shut up.
I hear the "proceed with movement" command makes an event halt until the last move event in it finishes. Check it out, bro.


I hear the "proceed with movement" command makes your game freeze every time you try to open a box or door (i.e. every time it targets "This Object"). Go 2k3.
Funny 2k3 bug: A parallel process event stuck in a loop constantly changing the system skin (to the same one every time) breaks move event! Boy was THAT a fun bug to find

Old video of a RMXP menu I was working on. Sorry about the low video quality, it'd old and I probably slashed the bitrate too much for a lower file size
post=141635
post=141634
post=141519
I also created a small puzzle that moves blocks across great distances, and then moves back. Problem is, Rm2k3 will execute the next MOVE EVENT command before the first one is finished, as I'm sure you're all aware. So I used a loop that breaks upon a switch being turned ON, which turns on when the square has moved it's entire distance, so I don't have to time how long it takes for the block to move across the map with "Wait"s. After the loop breaks, it moves back.
It's a simple, small little thing, but I felt proud for figuring it out. Shut up.
I hear the "proceed with movement" command makes an event halt until the last move event in it finishes. Check it out, bro.
I hear the "proceed with movement" command makes your game freeze every time you try to open a box or door (i.e. every time it targets "This Object"). Go 2k3.

I have never had that happen.
A new menu system script 'w')/
It only has Items, Virtue, Stats, Save and Quit. I think it's alright as it is :)
*edit* Broken script removed*

Kentona wanted something to mess around with walking speeds (like hero dashes by default)
I don't script big. I usually borrow things from people, and combine them into my game. I'm mostly doing that, taking music from newgrounds for my music. And I try my best to create my own art for monsters. What I would like to share is mostly events built off the simplest scripts.

The way my game works is a super mario galaxy styled collecter adventure style game. But in my game I'm calling the stars, memories. 6 memories in each world, and memories required to enter a new branch of memory.

Doing this is simple, and I just wanted to submit something to one of these. I just use a quest journal to record all the data of your past obtained memories. Each memory you collect adds to a variable, and I use that variable for the amount of memories needed to enter a new branch of memory. All of my game depends on this one variable.

So that's what I'm doing. I hope eventing counts as scripting.
halibabica
RMN's Official Reviewmonger
16948
Too bad this didn't come up when I was working on TLS. That thing's nothing BUT scripts. Stuff like:

if (gives a crap)
{
crap = true;
}
else crap = false;

GM's language is so much easier to work with than RM. Now that I'm back into PH4, I keep noticing all these things that would've been SO much easier in a more flexible system. Sigh...
WIP
I'm not comfortable with any idea that can't be expressed in the form of men's jewelry
11363
I am writing all the code for my game.
post=142614
I am writing all the code for a game that will never see the light of day.


FIXED :D
I found a bug in the custom move speed script I posted earlier (if you tried to get off a vehicle and failed, like from trying to land on impassable terrain). It would always restore the hero's walk speed when the hero tried to get off instead of checking if the player successfully got off the vehicle. here's the fixed version:


# ==============================
# Custom Event Speeds v1.1
# by GreatRedSpirit
# ==============================
# All default speeds are hard coded into the scripts which is silly and I'll
# be cutting that kind of gunk out!
# Now the adjusted speed

module Speed

# Move speed multiplier
# A step up in speed is a speed multiplication of this value
@multiplier = 2.0
# Default move speed of the player
@player = 5
# Speed multiplier of the player when dashing
@dash = 0.5
# Default walking speed of events and the player
@event = 4
# Default speeds of the vehicles
@airship = 6
@ship = 5
@boat = 5

#-----------------------------------------------------------------------------
# Get and set the default move speeds
def self.multiplier
return @multiplier
end

def self.multiplier=(new)
return @multiplier if @multiplier == new
return @multiplier = new
end

def self.player
return @player
end

def self.player=(new)
return @player if @player == new
return @player = new
end

def self.dash
return @dash
end

def self.dash=(new)
return @dash if @dash == new
return @dash = new
end

def self.event
return @event
end

def self.event=(new)
return @event if @event == new
return @event = new
end

def self.airship
return @airship
end

def self.airship=(new)
return @airship if @airship == new
return @airship = new
end

def self.ship
return @ship
end

def self.ship=(new)
return @ship if @ship == new
return @ship = new
end

def self.boat
return @boat
end

def self.boat=(new)
return @boat if @boat == new
return @boat = new
end

# Dump the speeds into an array so they can be saved
def self.save_speeds
array = []
array.push(@multiplier)
array.push(@player)
array.push(@dash)
array.push(@event)
array.push(@airship)
array.push(@ship)
array.push(@boat)
return array
end

# Load an array of values into speeds (like from loading a game)
def self.load_speeds(array)
if array.size >= 7
@multiplier = array[0]
@player = array[1]
@dash = array[2]
@event = array[3]
@airship = array[4]
@ship = array[5]
@boat = array[6]
else
print "Speed couldn't load array, bad dimensions"
end
end
end

#-------------------------------------------------------------------------------
# Set a character's move speed to its default value

class Game_Character
# When initialized, set speed to default speed
alias initialize_gc_cds_ori initialize unless $@
def initialize
# Init character
initialize_gc_cds_ori
# Set move speed to default value
@move_speed = Speed.event
end

# When the character moves, multiply the distance by the dash speed
# Does not call original method, it modifies the event's position
def update_move
distance = Speed.multiplier ** @move_speed # Convert to movement distance
distance *= Speed.dash if dash? # If dashing, double it
@real_x = [@real_x - distance, @x * 256].max if @x * 256 < @real_x
@real_x = [@real_x + distance, @x * 256].min if @x * 256 > @real_x
@real_y = [@real_y - distance, @y * 256].max if @y * 256 < @real_y
@real_y = [@real_y + distance, @y * 256].min if @y * 256 > @real_y
update_bush_depth unless moving?
if @walk_anime
@anime_count += 1.5
elsif @step_anime
@anime_count += 1
end
end

# Update the animation depending on the dash setting
# Does not call the original method, it'd update the animation twice
def update_animation
if Speed.dash < 1
dashMod = -(Speed.dash ** -1).to_i
else
dashMod = (Speed.dash / 2).to_i
end
speed = @move_speed + (dash? ? dashMod : 0)
if @anime_count > 18 - speed * 2
if not @step_anime and @stop_count > 0
@pattern = @original_pattern
else
@pattern = (@pattern + 1) % 4
end
@anime_count = 0
end
end

end

#-------------------------------------------------------------------------------
# Set the move speed of a vehicle when getting on a vehicle

class Game_Vehicle < Game_Character
# When the player gets on a vehicle set the vehicle's work speed
alias get_on_cds_ori get_on unless $@
def get_on
# Set speed before getting on the vehicle
case @type
when 0;
@move_speed = Speed.boat
when 1;
@move_speed = Speed.ship
when 2;
@move_speed = Speed.airship
end
# Now get on the vehicle
get_on_cds_ori
end

# When refreshing a vehicle, regrab the correct move speed
alias refresh_cds_ori refresh unless $@
def refresh
# First call the original method, we'll fix the speed last
refresh_cds_ori
# Set the move speed to the correct vehicle
case @type
when 0;
@move_speed = Speed.boat
when 1;
@move_speed = Speed.ship
when 2;
@move_speed = Speed.airship
end
end

end

#-------------------------------------------------------------------------------
# The player character should remember its walking speed after getting off
# a vehicle
class Game_Player < Game_Character

# Set the player's movement speed to its default value
alias initialize_gp_cds_ori initialize unless $@
def initialize
# Create the player character
initialize_gp_cds_ori
# Set movement speed to default
@move_speed = Speed.player
end

# When the player gets on a vehicle, remember their current speed
alias get_on_vehicle_cds_ori get_on_vehicle unless $@
def get_on_vehicle
# Remember move speed
@old_move_speed = @move_speed
# Now get on the vehicle!
get_on_vehicle_cds_ori
end

# When the player gets off a vehicle, set their move speed to the
# remembered value
alias get_off_vehicle_cds_ori get_off_vehicle unless $@
def get_off_vehicle
# Get off the vehicle (move speed set to 4)
get_off_vehicle_cds_ori
# If the player is getting off a vehicle, restore their walk speed
@move_speed = @old_move_speed if @vehicle_getting_off == true
end

end

#-------------------------------------------------------------------------------
# When saving/loading the game, save/load the speeds set in the Speed module

class Scene_File < Scene_Base
alias write_save_data_cds_ori write_save_data unless $@
def write_save_data(file)
# Call original method first
write_save_data_cds_ori(file)
# Save the speed array
Marshal.dump(Speed.save_speeds, file)
end

alias read_save_data_cds_ori read_save_data unless $@
def read_save_data(file)
# Call the original method first (same order as saving)
read_save_data_cds_ori(file)
# Load the game speeds into the speed module
Speed.load_speeds( Marshal.load(file) )
end
end
Pages: 1