Jump to content

Photo

Creating custom swords and wands


  • Please log in to reply
56 replies to this topic

#31 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 01 August 2013 - 02:26 PM

Yeah, those items work great :) I really like what you did with the swords, too.



#32 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 August 2013 - 03:42 AM

I'm pleased that you like them. If you want to open the quest in ZQ, yo can give yourself every item in Init data to try them out. The Mirror broke, and part of the staff code broke somewhere along the lines, although the staff is still partly functional.

 

With the Mirror, I wanted to use it to make Link invisible, and bypass laser security systems. he can still be hurt, but cannot be seen, and can pass by laser beams. It runs off a bool command that seems to have problems now that it did not before, and I'vent deduced why, although I;ve been so busy that it has become a back-burner issue.

 

I still need to make custom sprites for the swords, and give each an action script to define what it can do. I think that I can make one (or two) sword script(s) for my game to cover everything.

 

I would love to have you as a playtester as well, if you are interested.

 

You can see though that adding items to the submenu, and having ten swords with different abilities, that can be upgraded, are possible. To have ten total swords, you can use the swords class, but to have ten with distinct level upgrades of each would require using custom classes and scripting the sword slash and sword effects to attach as an action script, as the game would become confused by upgrading them if they all share one class. If you want items that you can upgrade, you need them to share a class.

 

(I still wish that I could customise item classes.)

 

I can work on a sword script soon, and post it for you, to use to that end. I need it for my game anyway, although my swords use the swords class and only need special abilities. Keep in mind that making an effect piercing is still an issue that I am having difficulty to get working correctly, although I now have more information and should be able to work it out. Thus, if you make a sword a custom class, you will need to have a piercing set of commands in your global active while(true) loop, unless I can find out how to do this on an item script with a for command.

 

(Did you like the effects I put on the Bolt! spell? I'm still deciding if it should penetrate (piercing), or if it is fine by itself.)

 

I'm hoping to give all the Sernarani items special powers. The only one coded at present (Sernaran of Light) refills MP. These items are based on the game logic from my RPG, converted into Zelda-friendly terms.



#33 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 02 August 2013 - 03:59 AM

Personally, for the bolt script, I'd change a couple minor things. For one, I'd make it pierce (just because something about a lightning bolt screams "piercing" in my mind), but mainly, I'd try to make it longer than just one frame. Right now it has kind of a Zeus-y feel to it (although it looks a bit odd, cuz the bolt's angled), but I'd go for more of a Darth Sidious approach, if possible, where the lightning stretches across the screen from link's body instead of being hurled. Another option would be like a "ball lightning" sprite that explodes into the bolts on impact (like a sword beam). Those are purely aesthetic things, though, and I'm sure plenty of people would disagree with me. I really like what I saw in there, and I see exactly what you meant about the swords. That being said, once this attack boosting script works (the attack ring that Moscow Modder made, although, it's actually the replacement for the magic book in my quest), I'll have no need whatsoever for multi-level swords (thank goodness, too. I don't know if I'd be up to making 50 more of those). But yeah, I'd be happy to playtest, just be warned that I kinda suck at playing. Actually, I'm more of the "design guy" than anything. I come up with stories and ideas, but I'm not so good at implementing them, because balancing a game is a pain when "playable" to you means "way too damned easy" for everybody else, lol. But at very least, I should be able to bug hunt and stuff. I also really like how you turned it into a pseudo D20 system. It made my inner D&D nerd smile.

 

EDIT: While we're on the topic, would you be at all interested in playtesting my quest once I get everything working and updated for the new format? I just need to confirm the attack boosting script is working, fix the balancing (the dungeon enemies are apparently too hard, I wouldn't know, I was dying when they were easy, so I was using cheats just to make sure there were no gamebreakers in the dungeons) then implement all the projectiles for the swords (although, I actually only really need the scripts for the fire, forest, water and wind swords to work and the wind sword is the only one I don't think I could fake until I got a better script, cuz I already have a good one), but I'd rather get them all working before I move on, less having to restart the quest from the very beginning that way. Anyways, once that's all working, I just have to do the wind temple, and I'll be ready for the next release. So, tentative release date.... two weeks? Assuming I don't have all of the scripts I need dropped on my lap tomorrow, lol.


Edited by Lineas, 02 August 2013 - 04:25 AM.


#34 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 August 2013 - 10:50 AM

I already have something more flashy in mind for the spell effects of the key dungeon items (i.e. the Sernarani). I do think that the lightning bolt could be piercing, and I may animate the bolt with something nicer (later), but merely having it working at present takes some weight off of my mind. I did intend it to be a singular bolt, in any event: I originally had it drawing a line between the player and the enemy, which I found too silly, and this came out far better. In D&D terms, think of this as 'Call Lightning'. 

 

I am also concerned that doing piercing damage would mean it was overpowered, as it already does 1HP global damage in addition to directed damage (which is similar to a 2E spell).

 

I do want to save the truly flashy (and tedious to create) effects for the key items, in any event, and the major spell items will either be learned or acquired starting at (in my estimate) Deep Five or later. I have one screen of that deep finished, which means that it'll be quite a while before I'm ready to start wondering about how to include them and where... I need to work on more enemies and of course, the bosses to make the labyrinth more appropriately populated.

 

This is all based on setting and system details from ZRPG, which is a d20 system; hence why you may have felt that vibe in playing the game, although it has as much in common with RIFTs and Rolemaster as it does with d20.

 

One of the problems that I face in playtesting games is that game creators often feel that it is fun and smart to make enemies too bloody difficult and choose illogical solutions to problems and puzzles. I prefer a (video) game that borders on moderate most of the time, with some harder areas, that I may play casually, and makes me think. If I need to be a grand master to pass Level-1, something is wrong with the game, not me.

 

It's just as likely that people will find the enemies in my game too easy, as they are used to challenge rated games. I eventually completed both quests of Outlands on real hardware; I don't feel the need to go through that on a routine basis. I can breeze through SMB2(J), as I've been playing it for decades, but I can;t play the Kaizou games for anything. I like challenge, but only when it's fair, and in a ZC game, enemies do not follow a predictable, routine pattern at all times, so it can be tough to decide if something is too easy or too difficult. The main part is if it is a challenge that an average player can overcome.

 

I suggest playing your game without cheats enabled. If you run into places that you can;t pass, the chances are that (as you know the solutions in advance) no player will pass them, or most will give up on reaching that impasse. I'm happy to test your game when you feel it is ready for testing, and I'll let you know if I run into any problems. The only basic advice that I can give you is simply that it is impossible to please everyone. Make something you feel that you would like to play first and worry about everyone else later.


  • Binx likes this

#35 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 03 August 2013 - 07:21 PM

 

I can't say with certainty, but if your use an FFC script for the trigger, you may be able to use the arguments for that to make it work.
 
I tested my scripts from this post and fixed a few errors. here is a new set of scripts that you may find useful; all tested with DEMO. Try the Rod of Dragonfire for the Generic LWeapon item script, and the Bolt! item for the BoltSpell item and FlashScreen FFC scripts.

 So, back to this stuff, here: Did you create a custom LWeapon for the bolt spell? Could you explain to me how making the custom projectiles themselves works? Mostly I want to be able to have it do things like, it shoots magic (which can be a generic sprite, really) but when it hits something, it spawns another LWeapon, like LW_SBOMBBLAST or LW_FIRE, basically, like pseudo-wand magic that you don't need a book for, or just redoing a sword beam, but I need it to be considerably weaker than the sword's main attack (the reason for this is that in order for the attack ring to apply  damage correctly to swords, it had to be used with a whimsical ring, which only ADDS damage, doesn't multiply it, so for my Golden Sword to do double damage, I need the sword to have a power of 33, cuz 33+31=64=2(31+1), but have the BEAM have only 2 power, since the attack ring will multiply everything that isn't a sword, including sword beams, and the attack ring that Link gets when he gets the golden sword is a 32x multiplier). Plus, I know EWeapons are built with the same format, so I could use that knowledge to create new EWeapons, too, like ice attacks or wind magic that doesn't send you back to the start of the freaking dungeon. Oh, yeah, btw, that attack ring script? Totally working like a charm, now, hence my shift of focus, now, I can move on to phase 2: adding the custom projectiles to the game, so I can assign them to my swords and test out that FFC  trigger that grayswandir made. Once that's done, I just need to set up my new Eweapons (I just really want to make ice projectiles, I mean, the tiles and weapons/misc data are already there, albeit unused, so, why the hell not?) set up the global script for having icy terrain (which I just remembered I never set up), and THEN I'm pretty sure I won't have anything left to worry about script-wise until I get to the end of the second to last level and have to start placing scripted bosses.


Totally off topic, but is there a way to chain pickup scripts? or activate a pickup script when an item is placed directly into the inventory instead of being picked up? Basically, MAJOR PLOTLINE SPOILERS TO FOLLOW:

Spoiler



#36 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 03 August 2013 - 09:44 PM

A quick reply to your question: To my knowldge, you can make one dummy item that gives you another, and in the pickup script for that item, give another item, and keep chaining them in that manner.
 
This all works vis this kind of script:
 

item script chainPickup{

void run(int itemToGive){
item giveitem= Screen->CreateItem(itemToGive);
giveitem->X = Link->X;
giveitem->Y = Link->Y;
giveitem->Z = Link->Z;

    }
}

Add that to the first item in the chain, with the argument D0 set to give another item, then put the same script as the pickup script on the next item, and set its D0 argument to the next item to give, and that item would have this pickup script, and give another item, as long as you want. I haven't tried to do that, but I see no reason for it not t work.

 

The Bolt! script is merely making an LW_ARROW with a sprite effect on it, and a screen flash (called by an FFC script) with a sound effect. Making a special animation on impact is more complicated, and I would need to get back to you on that. I suppose that you could also use an FFC script to make the secondary effect of an explosions, or what-have-you, but I am unsure how to read in coordinates for the target, as it would be OnImpact.

 

As soon as I learn how to reference the actual impact event, i will better know how to approach this. I wasn;t planning on doing something that as you say, explodes or bursts into flame when it hits an enemy. The normal methods would probably be to find out what enemy was hit, and produce a second LWeapon at those coordinates. Frankly, I would like to learn how to use the LW_SCRIPT types, making actual scripted LWeapons that can be used via a call to that LW_SCRIPT lType at any point in the game.

 

I think I posted the Bolt script, but I will comment it further, and post it if you need to see how it works. I truly learned a great deal by examining MM's LWeapon scripts, so most of what I know comes from examining the work of good scripts made my other community members; more-so than the actual documentation, as the docs provide no examples on how to use the commands and functions. While Bolt! is technically a new effect, its foundation is built on the work of others.


Edited by ZoriaRPG, 03 August 2013 - 10:27 PM.


#37 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 03 August 2013 - 10:28 PM

A quick reply to your question: To my knowldge, you can make one dummy item that gives you another, and in the pickup script for that item, give another item, and keep chaining them in that manner.
 
This all works vis this kind of script:
 

item script chainPickup{

void run(int itemToGive){
item giveitem= Screen->CreateItem(itemToGive);
giveitem->X = Link->X;
giveitem->Y = Link->Y;
giveitem->Z = Link->Z;

    }
}

Add that to the first item in the chain, with the argument D0 set to give another item, then put the same script as the pickup script on the next item, and set its D0 argument to the next item to give, and that item would have this pickup script, and give another item, as long as you want. I haven't tried to do that, but I see no reason for it not t work.

 

The Bolt! script is merely making an LW_ARROW with a sprite effect on it, and a screen flash (called by an FFC script) with a sound effect. Making a special animation on impact is more complicated, and I would need to get back to you on that. I suppose that you could also use an FFC script to make the secondary effect of an explosions, or what-have-you, but I am unsure how to read in coordinates for the target, as it would be OnImpact.

Yeah... I already tried just chaining pickup scripts, it doesn't work. The problem seems to be that the pickup script is activated when Link interacts with the item, so items that are just placed directly into your inventory skip the check that says "hey, I'm being picked up". Same reason that item bundles and dummy items don't work when added directly to your inventory via the cheat menu.

 

EDIT: To be more clear, what I specifically had done was I placed and item bundle script to an item that contained the sword, attack ring L1, bow and bomb bag, then added another bundle script to the bow and bomb bag to give me a quiver, arrows and ammo; and bombs and bomb ammo, respectively. When I picked up the bundle, I got the sword, attack ring, bomb bag and bow, but did not get the quiver, arrows or bombs (or the ammunition). I double and triple checked my arguments and script assignments to make sure, too.


Edited by Lineas, 03 August 2013 - 10:33 PM.


#38 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 August 2013 - 08:48 AM

Sorry, I was off-line for three days. My mobile carries changed their website about, and I couldn't bloody pay them because it kept redirecting me in a circle every time I tried to log into my account... I nad typed this and was trying to post it, at the same time that my service expired:
 
That's odd to me, as the CreateItem command is supposed to place any item on the screen, and when Link touches it it becomes part of inventory. That script is placing it at the same position as Link, so he automatically picks it up.
 
You know, I think there is simple way to do this, and should've been obvious to me, as you only want to pickup three or four items at once, so you don;t need a truly infinite chain: Now that my head is less full of rubble, I offer you this to try:
 

D0 - D7: Set these to the items you want to give in the bundle and place as the pickup script on one dummy item.

item script MultipleItemPickup{

void run(int Item0, int Item1, int Item2, int Item3, int Item4, int Item5, int Item6, int Item7){
item giveitem0= Screen->CreateItem(Item0);
giveitem0->X = Link->X;
giveitem0->Y = Link->Y;
giveitem0->Z = Link->Z;
item giveitem1= Screen->CreateItem(Item1);
giveitem1->X = Link->X;
giveitem1->Y = Link->Y;
giveitem1->Z = Link->Z;
item giveitem2= Screen->CreateItem(Item2);
giveitem2->X = Link->X;
giveitem2->Y = Link->Y;
giveitem2->Z = Link->Z;
item giveitem3= Screen->CreateItem(Item3);
giveitem3->X = Link->X;
giveitem3->Y = Link->Y;
giveitem3->Z = Link->Z;
item giveitem4= Screen->CreateItem(Item4);
giveitem4->X = Link->X;
giveitem4->Y = Link->Y;
giveitem4->Z = Link->Z;
item giveitem5= Screen->CreateItem(Item5);
giveitem5->X = Link->X;
giveitem5->Y = Link->Y;
giveitem5->Z = Link->Z;
item giveitem6= Screen->CreateItem(Item6);
giveitem6->X = Link->X;
giveitem6->Y = Link->Y;
giveitem6->Z = Link->Z;
item giveitem7= Screen->CreateItem(Item7);
giveitem7->X = Link->X;
giveitem7->Y = Link->Y;
giveitem7->Z = Link->Z;

    }
}

I think that should work, although it is as yet untested.



#39 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 August 2013 - 09:15 AM

Hmmm... That one seems to chain, actually. Or at least it'll chain with the D0.  I couldn't get it to give me both the bow items AND the bombs, but as long as I only need one extra chain link, I should be fine (althought it leaves behind a rupee when I pick stuff up that are attached to thisfor some reason). I was using a more generic bundle script:

item script ItemBundle
{
    void run(int a, int b, int c, int d, int e, int f)
    {
        Link->Item[a] = true;
        Link->Item[b] = true;
        Link->Item[c] = true;
        Link->Item[d] = true;
        Link->Item[e] = true;
        Link->Item[f] = true;
    }
}

Not that it makes much difference, Just thought you might want to see what was causing the problem.



#40 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 August 2013 - 12:28 PM

I wonder if that's a side-effect of having CreateItem[0]?

 

If you drop the number of items created down to the maximum you require, you might rid yourself of that side-effect. Therefore, if you need to give three items at once, just remove from CreateItem3 down to CreateItem7 and remove the Int values for Item3, Item4, Item5, item6, and Item7.

 

That would give you exactly three slots, Item0, Item1, and Item2 as D0, D1 and D2. If each of your bundle pickups has the same number of items, and you don;t need more, just truncate the script to the number of items you are giving in each bundle.

 

Precisely what items did you try to assign to the values so that I can try to replicate it?

 

Setting items to true has a different effect than creating them, as creating them at Link's position forces the game to pick them up, activating a pickup action, as far as I understand.



#41 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 August 2013 - 12:40 PM

I had the wooden sword, attack ring 1, ice boomerang, bomb bag (bombs, bombx12), bow (quiver, arrow, arrox30). Stuff in parentheses are the items attached to the script on THOSE items. I got the bombs, but not the arrows or quiver. Not really that big a deal, though. The way it works now would be enough for my purposes. Or I could always go with that cutscene. I'd just have to make sure, if I did it that way, that the triforce-wielding bosses were fought in a specific order, Or, I guess, I could actually make all three boss rooms identical, then I could apply the cutscene to all three rooms, I'd just have to make a counter item and a script that checks to make sure you have all three before it activates the cutscene. Could that be done with a pickup script? I mean link picks up item, pickup script runs and checks if he has all three of the item, if he doesn't, it just terminates, if he does, it activates an auto-warp to a cutscene.



#42 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 August 2013 - 12:48 PM

I count seven items. rather than chaining the bombs and bomb bag, quiver, arrows and arrow(x30), see if it works by entering each item into one of the argument slots. Enter the item and quiver before ammo, just to be on the safe side, as it should create them in order. If that doesn't work, I can probably make something that does.

 

(Tip: You can add a cutscene via FFCscript.zh and stdExtra.zh by making it via an FFC script, and calling the FFC script during the pickup script.)



#43 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 August 2013 - 12:55 PM

Oh, I was only doing it that way to test how it works. The main object was to make it so that I could set up a counter item called "triforce pieces" and when you got three of them, it would give you the "triforce item" (which itself is nothing more than an item bundle for "Sword of the Gods", "Gold Ring", "Book of Magic- Adept", "Deity Shield" and "Golden Arrows") the reason I needed to be able to chain wasn't about the QUANTITY of items, it was about needing to be able to place the item directly into my inventory from a DIFFERENT script and have it still activate the pickup. but I think I could alter YOUR bundle script to do the same thing, rather than have it just place the triforce item into my inventory, it would generate the item on Link's location, I think, so he'd auto-pickup, and that SHOULD allow the Triforce pickup script to function.



#44 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 August 2013 - 05:24 PM

For the defenses, I made a function that emulates the built-in defenses so that script weapons can use them to mimick default weapons when I was working on a scripted bomb. Hope this helps, especially with the Fire element.

void EmulateDefenses(lweapon wpn, npc nme, int def){ //The start of the function. The variables are the LWeapon to use, the npc is has just collided with and the defense you want to imitate.
    if(nme->Defense[def] == NPCDT_HALFDAMAGE){ //Halves the LWeapon's damage.
        wpn->Damage /= 2;
    }
    else if(nme->Defense[def] == NPCDT_QUARTERDAMAGE){ //Quarters the LWeapon's damage
        wpn->Damage /= 4;
    }
    else if(nme->Defense[def] == NPCDT_STUN){ //Stuns the NPC
        wpn->Damage = 0;
        nme->Stun = 256;
    }
    else if(nme->Defense[def] == NPCDT_STUNORBLOCK){ //Stuns or blocks the LWeapon
        if(wpn->Damage >= 2){
            wpn->Damage = 0;
            nme->Stun = 256;
        }
        else{
            Remove(wpn);
            Game->PlaySound(SFX_CLINK);
        }
    }
    else if(nme->Defense[def] == NPCDT_STUNORIGNORE){ //Stun or Ignore the NPC.
        if(wpn->Damage >= 2){
            wpn->Damage = 0;
            nme->Stun = 256;
        }
        else{
            Remove(wpn);
        }
    }
    else if(nme->Defense[def] == NPCDT_BLOCK1){ //Block if the LWeapon does 2 or less damage.
        if(wpn->Damage < 2){
            Remove(wpn);
            Game->PlaySound(SFX_CLINK);
        }
    }
    else if(nme->Defense[def] == NPCDT_BLOCK2){ //Block if the LWeapon does 4 or less damage.
        if(wpn->Damage < 4){
            Remove(wpn);
            Game->PlaySound(SFX_CLINK);
        }
    }
    else if(nme->Defense[def] == NPCDT_BLOCK4){ //Block if the LWeapon does 8 or less damage
        if(wpn->Damage < 8){
            Remove(wpn);
            Game->PlaySound(SFX_CLINK);
        }
    }
    else if(nme->Defense[def] == NPCDT_BLOCK6){ //Block if the LWeapon does 12 or less damage
        if(wpn->Damage < 12){
            Remove(wpn);
            Game->PlaySound(SFX_CLINK);
        }
    }
    else if(nme->Defense[def] == NPCDT_BLOCK8){ //Block if the LWeapon does 16 or less damage
        if(wpn->Damage < 16){
            Remove(wpn);
            Game->PlaySound(SFX_CLINK);
        }
    }
    else if(nme->Defense[def] == NPCDT_BLOCK){ //Blocks the LWeapon outright.
        Remove(wpn);
        Game->PlaySound(SFX_CLINK);
    }
    else if(nme->Defense[def] == NPCDT_IGNORE1){ //The LWeapon ignores the NPC if it would do 2 or less damage.
        if(wpn->Damage < 2){
            Remove(wpn);
        }
    }
    else if(nme->Defense[def] == NPCDT_IGNORE){ //The LWeapon outright ignores the NPC.
        Remove(wpn);
    }
    else if(nme->Defense[def] == NPCDT_ONEHITKILL){ //The LWeapon OHKOs the NPC.
        wpn->Damage = nme->HP;
    }
} 

The damage modifications can be easily done provided that the Script Weapon defense are set to "Normal" on all enemies. This will also mean that it would be useless on built-in Diggdoggers and Dodongoes. At the moment, I have no idea to add in new defenses to enemies without setting them all individually so you are out of luck here with me.

Hey, Orin, I'm not quite understanding this, here. How exactly would I set it up? I only need three defenses per weapon type: 2x, 0.5x and 0x, but I'm not sure if this should be in my global, or the item scripts?

 

EDIT: Also, it looks like this can only be done by LWeapon, but all of my elements contain the same 5 LWeapons (Sword Beam, Sword, Boomerang, Arrow, and Hammer) is this going to be a problem?


Edited by Lineas, 06 August 2013 - 05:48 PM.


#45 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 August 2013 - 06:14 PM

What if, instead of tweaking the enemy defense properties, we tweaked the weapon attacking properties? Could a person script an if statement to the effect of

 

if (NPC = x);

  damage *= 2

 

?

 

cuz if you could make the attack properties change, depending on the enemy Link hits, I think that would likely be the easiest, functional way to do it, so you don't have to rely on the hard coded defense attributes




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users