[XP] Advance Wars Engine

Started by KK20, November 20, 2012, 08:51:57 pm

Previous topic - Next topic

KK20

She still has a pretty awesome SCOP and D2D. Against the computer, however, she's not all that special.
I'm possibly considering changing the hidden HP rules to be "once attacked, the HP is displayed for the rest of your turn". Getting even more nerfed by the moment :P

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

Would it be possible to add a status effect that lowers both Offense and Defense simultaneously? As of now I've only been able to get one of either working, and though it should be possible by making two separate buffs, that might be a bit overblown.

Is it possible to make the buffs stack too?

KK20

You should be able to. I wrote the script with that in mind. The configuration says how to have two stats be applied.
Increasing a unit's attack and defense by 20 for one whole turn would be
return [1, 'offense', 20, 'defense', 20]

And yes, they should stack with other status effects. (So if applied with a -20 attack and defense debuff, they would cancel out).

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

Would it be able to stack with itself?

KK20

Looking at the code, yes it should.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

Without any additions, just like that?  :O.o:

Zexion

March 18, 2014, 02:31:33 pm #66 Last Edit: March 18, 2014, 02:34:52 pm by Zexion
A friend and I were playing a quick match before he went to class lol.(I was andy)
Spoiler: ShowHide


As you can see, I stupidly bought the missles when there was no airplane even in the game lol
Also, a small(?) but useful addition that could be made (even for this version): Save the game. Like for right now he had to go so it wouldve been cool if I could save and coninue later :P

Gears

March 18, 2014, 03:57:21 pm #67 Last Edit: March 18, 2014, 04:01:29 pm by Gears
That's up to the head honcho, though making save files is probably just as tedious as coding AI. Not that i would readily know that.

I managed something weird though. I managed to make a SCOP that mind-controls (some) enemy units, switching their owners around. the funny thing is that it doesn't switch the sprites around. Leaving you with units of another color in your control.  I'll have to find a way to manually update those.

KK20

@Zexion: Yeah, when I get everything cleaned up, I'll try and figure out what's the best way to save games. But looking at that screenshot (which is awesome to see someone finally posting games), your friend had you good. You would probably have to resort to an Anti-Tank parked on a southern city to fend off the Megatank and Neotank and try to push your way south before he captures your north-western base and starts to build a siege force from there. What CO was he? Because to be able to have an army of that power, I'd expect he was Colin or Hachi.

@Gears: That's interesting. I didn't think something like that was entirely possible in the engine's current state. To change the sprites, you'll need to call its refresh method after changing the @army variable it belongs to. Of course, you'd need some kind of original_army variable to change it back and call refresh again.

I'd like to see your COs in a gameplay. :)

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

March 18, 2014, 05:28:09 pm #69 Last Edit: March 18, 2014, 05:38:36 pm by Gears
It mind controls permanently, so there's no need to turn it back with a variable. I might use non-permanent mind control in another way though. Time to find the refresh method.


HA, i think i got it. yup i did.

KK20

I think a simple your_unit_variable_name.sprite.refresh would do the trick.
EDIT:  :ninja:

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

Here's how it works. It's pretty simple as far as code goes:

Spoiler: ShowHide
def use_scop
super
add_status(3, $game_map.units - @army.units)
   
    loc = $scene.find_best_missile_spot(0)
# Get all the spots where this missile hits
positions = $game_map.get_spaces_in_area(loc[0],loc[1],0)
positions.each{|pos|
# Get unit at this spot
u = $game_map.get_unit(pos[0],pos[1])
next if u.nil?
# Damage it and apply status effect
###########
      u.army = @army
      u.sprite.refresh
     
      #########################
     
}
$game_player.moveto(loc[0],loc[1], true)
   
end
   


As you can see, it's your Rachel missile aiming algorithm, but instead of damage, it changes the army class!

KK20

March 18, 2014, 06:08:13 pm #72 Last Edit: March 18, 2014, 06:13:23 pm by KK20
Ah, I see. It just seeks out the highest cost enemy unit and converts its army. lol that's interesting xD I also see you have a status effect that targets all enemy units. What does that do? And wouldn't it affect your mind controlled unit?

How many stars is the SCOP?
EDIT: Rather, I should be asking what does your CO do in its entirety?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Zexion

Haha yeah he had me cornered. I don't know the co's name but he was le muscular dude. He was trying to teach me how to play. He's going to bring his gba game tomorrow. It's all great news because I'm starting to see how this should work lol (animation-wise)

KK20

Must be Max
Spoiler: ShowHide

I forgot I made him the default P2 CO when in my current build it's Olaf. Going off on a tangent here: Max is such a hard character to play. Against an evenly matched opponent, he ranks low on the tier list. I'm having a hard time trying to think of ways to balance him more without destroying his core style. Maybe if I didn't reduce his indirect unit attack range, make them 70/100 or something low.

That's cool :) Nothing like playing the original to understand how it works. If your friend suggests anything, be sure to tell me about it.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

The status effect would be applied to the unit with the code in question, had i not moved it a bit downwards yesterday. I was testing to see if the mind control worked first after all.

The CO in question has reduced day-to day units, but works by applying a -10% offense and defense debuff to every unit he attacks after damage calculation, this makes him more effective on subsequent attacks. his CO applies this debuff to all enemy units, and his SCO applies it twice, in addition to the mind control.


also, some minor things: aren't zeppelins also indirect units? they seem to be lacking in the INDIRECT type. Zeppelins also seem to state that it costs 3 fuel to move them, while the unit file uses 5 fuel as a variable.

KK20

10% defense might be a lot at a time, especially if the effect carries over for a full day. I also don't recall if I made some preemptive measures should the defense be less than or equal to 0. I also think that it can be so overly abused with a meat shield and indirect units approach. Maybe if it was like -5% defense for every HP the enemy losses as damage.

Huh...I guess I overlooked some things for the Zep. I was conflicted whether to classify it as a copter or plane OR to make it a plane with copter fuel penalties (but I later figured that would break the AW mold so I decided to opt for 5 fuel a day). Probably fixed by now.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

The defense and offense loss only stays during the CO's own turn, so once he ends his turn, all your units are returned to maximum strength (unless there's something else going on) I'll see if the defense suddenly turns negative or something.

Strategy-wise, this COc can indeed be used by indirects coupled with meatshields. However, as the regular units of this commander all have 10% less offense and defense, you'd have to either sacrifice some of that meatshield to apply the debuffs, or use less potent indirect attacks to finish them off with your meatshield. It all comes down to whether you need more then one attack to finish of the unit in question, and at the beginning of an assault, you're always at a disadvantage, even the next attack would only be on equal grounds (both units 90% of the normal offense and defense assuming some form of generic CO without bonuses).

Even if that proves OP, i'm not that worried. If all the CO's i make are OP, it'll balance itself out.

KK20

I guess the true way to determine the level of OP-ness is test playing it on even grounds.

I came up with a defensive CO that lacks offensive power (80/130). His COP increased his defenses further and gave him defense luck. His 8 star SCOP halved all incoming damage and gave him the Pokemon equivalent of Sturdy--the unit always sustains 1HP before it can be destroyed. It didn't sound terribly strong, but a lot of test playing proved otherwise. I think the only CO who could stand on even ground with him was Kanbei.

I have a bunch of other CO ideas I want to flesh out and try some time. I'll probably reserve them for my game when I'm satisfied with the engine.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Gears

March 19, 2014, 01:31:16 pm #79 Last Edit: March 19, 2014, 01:32:23 pm by Gears
In the Meanwhile, i'll just barge ahead.  :naughty:

For that defensive CO, i've got something similar. No sturdy involved, but i have a CO whose vehicles have reduced offense and improved defense. (70/150) (never tested, so that 150 is probably going to drop), however, he also has reduced movement and increased fuel consumption, meaning this wall of nigh-destructible tanks aren't going to rush in like madmen, and reducing his best units to a crawl as well as making him reliant on APC's.
His APC's do heal every unit nearby for 1 on every of his standby turns though, making them priority targets. As his CO Powers only simply increase the defense and counterattack, you can simply evade his vehicles and focus his other units during his CO powers.

Unrelated question: if i want to injure a unit after it's attacked or has been attacked, where should i add the code for it?

Currently i'm trying to put


Spoiler: ShowHide
 if @officer.class == CO_Blahdieblahdieblah
     self.injure(@army.officer.recoil_damage(self),false)
     end
     

beneath the counterattack but above the "destroy" tags,
Spoiler: ShowHide
	# Figure in counter attack
if initialized and !target.army.officer.first_counter
nearby_units = $game_map.get_nearby_units(target.x,target.y)
if target.health > 0.0 and nearby_units.include?(self) and target.min_range == 1 and target.can_attack?(self)
target.fire(self, false)
target.injure(damage, false, initialized)
end
end
     
    if @officer.class == CO_Blahdieblahdieblah
     self.injure(@army.officer.recoil_damage(self),false)
   end
   
destroy if unit_hp <= 0                        
target.destroy if target.unit_hp <= 0
end
but that won't work.