Jump to content

Photo

Non-Scripter's Custom Boss Kit


  • Please log in to reply
98 replies to this topic

#16 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 19 January 2014 - 02:35 AM

Double-post, but it's an update so...

 

I've decided to re-work how the script works to make it more convenient to use. In practice, it should be much easier to work with and much more versatile. Explaining it might be a bit more difficult, so I figured I'd post what I've got so far and try to explain what I'm doing with it. For simplicity's sake, the BigEnemy script has been removed for now. It'll go back in when I'm ready for it, but for now I have it taken out and I'm trying to get the basic functionality back. (in the process of improving it, I broke some things. I think they're fixed now.)

 

Current Script

The formatting and indenting looks off here, but it looks right and makes more sense in RText. It's just that spacing and tabs in the forum's codebox is annoying and difficult to get right. Anyways...

 

As it is now, the script runs off three possible modes: "Single Enemy", "Dual Enemy", and "Triple Enemy". These correspond to how many enemy slots are being used to build the custom enemy or boss. In "Single Enemy" Mode, the script will essentially be a glorified BigEnemy script that should set itself up automatically with the setting of a single argument.

 

"Dual Enemy" mode uses two enemy slots to build the custom enemy. The first slot will be for movement, while the second will combine weapon fire and collision together. If you just want something simple, like attaching a weapon to a Keese enemy, this will be the preferred setting. You can have up to five "Dual Enemy" custom enemies per screen.

 

"Triple Enemy" mode is how the script originally ran, with a separate enemy slot for movement, one for weapon fire, and one for collision. If you need something more complex, this is how you'll do it. Because each enemy will take up three enemy slots, you can only have up to three of them per screen. Needless to say, Dual and Triple Enemies can be mix-and-matched per screen by simply using multiple instances of the script.

 

Each mode should be activated as easily as possible. If Dual Enemy mode is desired, simply leave D2 blank. If Single Enemy mode is used, D1 and D2 would be left blank.

 

Next up, I'm going to re-incorporate the BigEnemy script into this, with some extra settings, after the earlier conversation about using them in side-view areas. I plan on having 5 default settings for the BigEnemy script. Top-Down 1x2, Side-View 1x2, 2x1 (should work for both top-down and side-view areas), Top-Down 2x2, and Side-View 2x2. Of course, for normal-sized custom enemies, D3 can be left blank, but otherwise it would be triggered by inserting anything from 1 to 5.

 

If this all works correctly, it should be more functional and easier to use. Unfortunately, this means a good-sized bit of extra coding on my end. I re-named the different variables to make the script easier to type out and read, but I have to pick out what settings are used for which modes, and I'm going to need to adapt the BigEnemy portion of the script for each individual mode, easily tripling the length of the original script. Not difficult, I don't think, but long and tedious to type out repeatedly.

 

By the way, the script as-written above should be functional as it is, so if anybody wants to play with it and see what they can come up with, feel free to do so. I wouldn't mind seeing what kind of enemies people come up with using my script, and it would speed up the testing process a lot!


Edited by kurt91, 19 January 2014 - 02:56 AM.


#17 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 19 January 2014 - 09:58 AM

Script fails to compile:

fail3_zps66814ac3.png



#18 anikom15

anikom15

    Dictator

  • Banned
  • Real Name:Westley
  • Location:California, United States

Posted 19 January 2014 - 05:39 PM

Extra comma at the end of the parameter list.

#19 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 19 January 2014 - 05:47 PM

I'm going over it now. RText is an awesome program, but the error-catcher portion for zscript seems to miss things quite a bit. I'm at the point where the script compiles correctly now.

There was a lot more wrong with it than just the comma. I forgot to declare all the variables, multiple lines had Movement and EnemyMove mixed up, or still ran off "n1", "n2", and "n3". It should be working now, but let me try a couple simple enemies with it just to make sure before I post it again. I don't want to waste anybody's time. Check back in about ten minutes tops.

 

EDIT: Okay, so I've got Triple Enemy Mode working correctly, but Dual Enemy Mode results in no collision working at all. Also, I found an interesting bug where you need to have "Enemy's Always Return" set up or else you might have individual components spawn by themselves on occasion. Nothing that bad, but I'd like to figure out how to make it so if one enemy in a set spawns, all the necessary parts are forced to spawn, but only the necessary parts for that individual enemy. Otherwise you might as well just have "Enemies Always Return".

 

EDIT II: I've got the collision issues fixed. You still need "Enemies Always Return" set up so it works consistently, but I'll see if I can fix that. Here's the new version of the script. Same set-up directions as before.

 

Custom Boss Kit v2.0

 

EDIT III: So, I'm trying to think of how I would set up consistent spawning without the "Enemies Always Return" flag, and I've got a vague idea. If I tell the quest-maker that they need to have a specific tile blank to use for Weapon/Collision enemy graphics, could I have the script check if an enemy uses that specific tile? I'm thinking to set it up so that if Movement is valid, it first checks if the following two enemies in the list use the invisible tile, and then creates those enemies first. After doing that, it checks to figure out which mode to activate. If Movement is not valid, the script would automatically kill the enemies marked as Weapon and Collision, unless I can prevent them from spawning immediately so that the spawning graphic doesn't flash in the frame they're both loaded and killed.


Edited by kurt91, 19 January 2014 - 06:16 PM.


#20 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 19 January 2014 - 09:14 PM

And how can I set up animations for big enemies with X-size > 1? I have tried to create a 2x1 enemy (Guarddog from CV1) and it show up glitched animations or even be invisible at all. 



#21 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 19 January 2014 - 09:23 PM

So far, I've only created 2x2 sized enemies with the BigEnemy script. I know it's possible to do the other sizes, because I've seen them done before, I just don't know at the moment how to set them up. As soon as I have them figured out, I'll post it.

 

EDIT: Okay, this is driving me insane...

if((!EnemyFire->isValid()) && (WeaponFire > 0)){ //If a second enemy does not exist due to death
Screen->CreateNPC(WeaponFire); //Create the second enemy
npc EnemyFire = Screen->LoadNPC(WeaponFire); //Bind label "EnemyFire" to newly-created enemy
}

 

I understand now that "Screen->CreateNPC" uses the ID of the enemy in the Enemy Editor and not the screen's Enemy List. So, since that's the case, how do I force the game to spawn the enemy on the list?


Edited by kurt91, 19 January 2014 - 10:06 PM.

  • Alucard648 likes this

#22 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 20 January 2014 - 09:01 PM

Did you know that std.zh header has function 

 Remove ( npcid )

It basically removes given enemy by moving it outside the screen and kills it, hopefully in a silent way.

 

P.S. Any updates? I am hoping this script will be put at good use in my quests.

P.P.S Did you test the script with ghosted enemies?



#23 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 21 January 2014 - 10:11 PM

I don't know how ghosted enemies work, and am planning on learning how to do that after getting the first finished version of this script done. 

 

As for updates, I have one but it's a bit disappointing. I'm writing this on a borrowed PC. My laptop fell and is broken, and it had all of my ZC stuff on it. I'm going to have to wait on working on this until I can replace the laptop. If I can't get anything salvaged from the hard drive, then my most recent backup is going to have to be the most recent posted version of the script.

 

On the bright side, though, I already know how to finish the script completely, having used a test version for a boss for Shoelace's Enemy of the Month contest. I figured out the numbers for getting the BigEnemy portion of the script working correctly. Once I get a replacement computer to work with and can get my scripting setup back together, I can have the finished script completed in about fifteen to twenty minutes, including time taken for testing and adjustments.

 

The method I came up with to fix the spawning problem is to check if the Weapon and Collision enemy data is valid and is greater than zero. If so, that means that they intend to exist, they just didn't spawn. Since I can't figure out how to make them spawn, I'll just have it kill off the remaining pieces of the enemy. That way, the only way the enemy can exist is if all three components exist at once.

 

Anyways, like I said, I'll have the finished script up about half-an-hour after getting a replacement computer and my files together. Unfortunately, I have no idea when I'll have the computer. My mom has a laptop that she doesn't use and said that I could have, but it needs a reboot disc before we can try to get my things transferred from the original hard drive. If that doesn't work out, then I'll have to wait until I can get the desktop computer I've been saving for and get things set up on that.



#24 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 21 January 2014 - 11:05 PM

As for updates, I have one but it's a bit disappointing. I'm writing this on a borrowed PC. My laptop fell and is broken, and it had all of my ZC stuff on it. I'm going to have to wait on working on this until I can replace the laptop. If I can't get anything salvaged from the hard drive, then my most recent backup is going to have to be the most recent posted version of the script.

Spoiler

 

On topic: as for ghosted enemies, the script should work if such enemy is used as "Movement" part of the boss. As for collision: that part should have an option to retain collision with Link. Otherwise Link can simply walk trough boss if the one has narrow vulerability core (like CV1 Dracula).

 

Will it be possible for the script in future to have more than one projectile shooter installed on boss enemy?



#25 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 22 January 2014 - 07:08 AM

Will it be possible for the script in future to have more than one projectile shooter installed on boss enemy?

That's actually something I'd like to see; it's be really cool! :D

#26 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 22 January 2014 - 10:50 PM

Borrowing the PC again, so I can answer a couple questions. (I NEED a break from these kids! I'm stuck babysitting all the time.)

 

The collision enemy is used for collision with Link, so naturally the BigEnemy portion of the script accounts for that. If you enlarge the enemy, ALL necessary components are increased in size.

 

I'm not sure if multiple projectile shooters will be possible without making the script more difficult to use, but I've been considering an alternative. I was thinking about how the reflection values for items like the shield work by adding together various values to get a single number that specifies exactly what projectiles it will reflect. If I were to do something similar with all the different EWeapons, I could incorporate them into a number of "Weapon->Choose" functions (I still can't access my scripting stuff, so sorry if that's named wrong.) and use one of the currently-unused arguments to override the default weapon on the Weapon enemy similar to how one of the Dark Link scripts I found works. Essentially, you can give the boss the ability to randomly fire any set of weapons using any firing pattern, or multiples of, you want. (Firing patterns would require another argument to do.) As long as I tell the script to check if the arguments are greater than zero before working out those portions of the script, it should be just as easy to make a boss that doesn't use those functions as it would have before adding them in.

 

I can't get to my files to actively work on the script, but I've been planning out additional features and trying to decide which ones are easy enough and versatile enough to incorporate.


Edited by kurt91, 22 January 2014 - 10:50 PM.


#27 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 24 January 2014 - 12:59 AM

Well, I've got the new computer (not really used, it's one that my mom never used since she got her iPhone, but we wiped the hard drive, so I can use it as my own) and am working on getting my stuff back together. I downloaded a new copy of RText to do my scripting in, but I can't get a hold of 2.50 RC1, so I'm having to test the script in an outdated version (Beta RC5), so no guarantees on whether or not the script will work in the newer version until I can test on it. (Also means my main quest is still unable to be worked on, but I don't mind waiting a bit more on that. Re-bugfixing it will be a pain, though.)

 

It didn't occur to me before, but I'm going to have to redo all the work I had put into the script since I posted it last, so that thirty minute update promise was a bit optimistic. I've got all the BigEnemy values to input for each of the various modes before I can release the first "finished" version of the script. After that, I've got the weapon and shot-type selector scripts to add in before I'm happy with it (for now).

 

So, long story short, progress is resuming on this, but don't expect any miracles time-frame wise. I'm going to need some time to work on this and redo what I had done.



#28 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 25 January 2014 - 12:59 AM

TEST VERSION 01 IS COMPLETED!!!

 

I've still got to do the testing to see if there are any bugs, but the finished script compiles correctly in ZQuest, so I thought I'd post it in case anybody wants to help test it or just try using it to make some unique boss fights for their quest. Here's the script, just copy/paste it into the appropriate file and import it into ZQuest.

 

 

===== DIRECTIONS =====

 

D0: Movement Enemy Data

 

This is the part of the enemy that you will see and controls the enemy's movement patterns. Simply put in the number of the enemy off the screen's enemy list. If it's the first enemy in the list, you would put in "1" for this argument

 

D1: Weapon Enemy Data

 

This is the part of the enemy that controls how its weapons are fired, and if no special data is needed for the third slot, collision data as well. Same rules apply as Movement data, just put in the enemy number off the screen's enemy list. Works best if the enemy has no visual graphics

 

D2: Collision Enemy Data

 

For particularly complex enemies that require a third slot, this third enemy controls how the enemy responds to Link's weapons, as well as collisions with Link. This will be the one that damages Link when it touches him as well as allows you to use features such as "Eat(Damage)". Same rules apply as for the first two arguments. Also works best if the enemy has no visual graphics

 

D3: Enemy Size

 

Based off the BigEnemy script, but with more of the bugs ironed out, the enemy's size on the screen can be controlled entirely through this one argument. The number input will grant your enemy a different shape.

 

Argument -> Size (Width x Height)

 

1 -> 1 x 2 (Top-Down Mode)

2 -> 2 x 2 (Top-Down Mode)

3 -> 1 x 2 (Sideview Mode)

4 -> 2 x 1 (Works in both Top-Down and Sideview screens)

5 -> 2 x 2 (Sideview Mode)

 

The best thing about this script is that there as well as a "Dual Enemy Mode" and "Triple Enemy Mode", there is also a "Solo Enemy Mode". Simply leave the data for the Weapon and Collision arguments blank, and you should be able to use the entire script as a relatively bug-free BigEnemy script only!

 

So, take some time and let me know how well the script works for what you need. Keep in mind that this is currently a "Custom Boss Kit", not a "Custom Enemy Kit". The enemies created will not work properly unless the "Enemies Always Return" flag is set to ensure that all required components of the enemy spawn every time on repeat visits to the screen. Therefore, unless you intend to create custom enemies that the player will have to fight every single time they travel through the screen, this would work best with bosses, since you only need them to show up and fight Link once, rendering the spawning issue a moot point.


Edited by kurt91, 25 January 2014 - 01:00 AM.


#29 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 25 January 2014 - 01:21 PM

4 -> 2 x 1 (Works in both Top-Down and Sideview screens)

How can I set up enemy tiles for this size so the monster shows up correctly?

 

Ok. Tested the script and enemies/bosses appear with wrong/glitghed graphics.

 

Updated test quest:https://www.mediafir...igydmfboqdm6cd9



#30 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 25 January 2014 - 03:23 PM

The graphics issue may be a bug with Single Enemy Mode. I forgot to set EnemyMove->Extend when there aren't any other enemies being used. Still working out how to arrange tiles, though.

 

If you'd like to apply the fix yourself instead of waiting on me, look for the line under the section for both Dual and Triple Enemy Modes where it says "EnemyMove->Extend = 3;". Copy that line to the area in-between the mode activation section and the Dual/Triple Enemy Mode section so that it triggers no matter what.

 

EDIT: Here's the tile set-up for the different sizes...

BigEnemySpriteSheet_zps5c5c1162.png

 

Don't use the "Big" options, these were set up using "2-Frame, 4-Dir". 2x2 enemies are the same as the lower set, but with the lower half of the sprite drawn on the tiles directly underneath. Theoretically, any animation type should work as long as the entire spritesheet can be drawn on one row. If you have to use multiple rows, like how the default enemies do shooting, the BigEnemy script doesn't work. There's nothing I can do about it for now, it's just an issue with how Enemy->Extend works in ZC.

 

Oh yeah, better post the fixed script, too...

 



Edited by kurt91, 25 January 2014 - 03:48 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users