Jump to content

Photo

Attack Ring


  • Please log in to reply
36 replies to this topic

#16 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 August 2013 - 11:07 AM

Plug your old global script here as well, and I will compare how you inserted this. It may be the position of your waitframe() that is causing this. I need to see how you had it set up before you added this, as you have some levels of encapsulation going on that I don't want to muddle up.
 
I think that your game is locking up because the waitframe() is outside your while loop, so ZASM never knows when to stop and draw. In other words, your waitframe() seems to be inside the void run() function, but outside your while(true) loop, so the loop runs forever.
 
I don;t know what you intended to be inside that though. For example, this is after and outside your while loop:
 

if(Link->Action != LA_SCROLLING) 
                        { 
                                Update_HoleLava(startx, starty, olddmap, oldscreen, startdir); 
                                if(Link->Z==0 && !Falling && (oldscreen != Game->GetCurDMapScreen() || olddmap != Game->GetCurDMap())) 
                                { 
                                        olddmap = Game->GetCurDMap(); 
                                        oldscreen = Game->GetCurDMapScreen(); 
                                        startx = Link->X; 
                                        starty = Link->Y; 
                                        startdir = Link->Dir;

It would be very helpful if the nesting was, err, organised. There are add-ons for Notepad++ (and other utilities) to automate that, although the name escapes me at present.
 
In the meanwhile, try this:

//Common Constant, only need to define once per script file. 
const int BIG_LINK                                              = 0;   //Set this constant to 1 if using the Large Link Hit Box feature. 
 
//Constants used by Bottomless Pits & Lava. 
const int CT_HOLELAVA                     = 128; //Combo type to use for pit holes and lava."No Ground Enemies by default" 
const int CF_PIT                                                                = 98;  //The combo flag to register combos as pits. 
const int CF_LAVA                                                 = 99;  //The combo flag to register combos as lava. 
const int WPS_LINK_FALL           = 88;  //The weapon sprite to display when Link falls into a pit. "Sprite 88 by default" 
const int WPS_LINK_LAVA           = 89;  //The weapon sprite to display when Link drowns in lava. "Sprite 89 by default" 
const int SFX_LINK_FALL           = 38;  //The sound to play when Link falls into a pit. "SFX_FALL by default" 
const int SFX_LINK_LAVA           = 55;  //The sound to play when Link drowns in Lava. "SFX_SPLASH by default. 
const int CMB_AUTOWARP                  = 888; //The first of your four transparent autowarp combos. 
const int HOLELAVA_DAMAGE                 = 8;   //Damage in hit points to inflict on link. "One Heart Container is worth 16 hit points" 
 
//Global variables used by Bottomless Pits & Lava. 
int Falling; 
bool Warping; 
 
//Global variables used by Attack Ring
float ATTACKRING_POWER = 1; //How much to multiply damage by (allows decimals)

const int MISC_LW_BOOSTED = 0; //Weapon->Misc[] slot for boosted weapons

const int MISC_WEAP_BOOSTED = 0;
    
global script slot2 
{ 
        void run() 
        { 
                //Initialize variables used to store Link's strating position on Screen Init. 
                int olddmap = Game->GetCurDMap(); 
                int oldscreen = Game->GetCurDMapScreen(); 
                int startx = Link->X; 
                int starty = Link->Y; 
                int startdir = Link->Dir; 
 
                //Clear global variables used by Bottomless pits. 
                Falling = 0; 
                Warping = false; 


                //Main Loop 
                while(true) 
                { 
			//Stops enemies from dropping ammunition items that Link doesn't have a way to carry (Bomb bag, quiver, etc.).
			for ( int i = 1; i <= Screen->NumItems(); i++) 
			{ 

				item drop = Screen->LoadItem(i);
				if ( (drop->ID == I_ARROWAMMO1 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_ARROWAMMO10 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_ARROWAMMO30 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_ARROWAMMO5 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_BOMBAMMO1 && !Link->Item[I_BOMBBAG1])
				|| ( drop->ID == I_BOMBAMMO4 && !Link->Item[I_BOMBBAG1])
				|| ( drop->ID == I_BOMBAMMO8 && !Link->Item[I_BOMBBAG1])
				|| ( drop->ID == I_BOMBAMMO30 && !Link->Item[I_BOMBBAG1]) )
					Remove (drop);
                    //hard-coded Self-upgrading drops
                if ( (drop->ID == I_SWORD1 && !Link->Item[I_SWORD1])) 
                    Remove (drop); //This checks if you have the wooden sword, if not, it removes the drop
                if ( (drop->ID == I_SWORD1 && Link->Item[I_SWORD1]))
                    drop->ID = I_SWORD2; //This checks if you have the wooden sword, if you do, it changes the picked up item to the white sword
                if ( (drop->ID == I_SWORD2 && Link->Item[I_SWORD2]))
                    drop->ID = I_SWORD3; //THis checks if you have the white sword, if you do, it replaces it with the magic sword
                if ( (drop->ID == I_SWORD3 && Link->Item[I_SWORD3]))
                    drop->ID = I_SWORD4;  //This checks if you have the magic sword, if you do, it replaces it with the master sword 
                
                //Attack Ring script body
                for(int i = 1; i <= Screen->NumLWeapons(); i++){
                lweapon weap = Screen->LoadLWeapon(i);
                if(weap->Misc[MISC_WEAP_BOOSTED] == 0){
                    weap->Damage *= ATTACKRING_POWER;
                    weap->Misc[MISC_LW_BOOSTED] == 1;
                }
            }
		

            }
 Waitframe(); 
			}
	
                        if(Link->Action != LA_SCROLLING) 
                        { 
                                Update_HoleLava(startx, starty, olddmap, oldscreen, startdir); 
                                if(Link->Z==0 && !Falling && (oldscreen != Game->GetCurDMapScreen() || olddmap != Game->GetCurDMap())) 
                                { 
                                        olddmap = Game->GetCurDMap(); 
                                        oldscreen = Game->GetCurDMapScreen(); 
                                        startx = Link->X; 
                                        starty = Link->Y; 
                                        startdir = Link->Dir; 
                                } 
								
                        } 
                        
                } 
        }  
//Handles Pit Combo Functionality. 
void Update_HoleLava(int x, int y, int dmap, int scr, int dir) 
{ 
        lweapon hookshot = LoadLWeaponOf(LW_HOOKSHOT); 
        if(hookshot->isValid()) return; 
 
        if(Falling) 
        { 
                Falling--; 
                if(Falling == 1) 
                { 
                        int buffer[] = "holelava"; 
                        if(CountFFCsRunning(Game->GetFFCScript(buffer))) 
                        { 
                                ffc f = Screen->LoadFFC(FindFFCRunning(Game->GetFFCScript(buffer))); 
                                Warping = true; 
                                if(f->InitD[1]==0) 
                                { 
                                        f->InitD[6] = x; 
                                        f->InitD[7] = y; 
                                } 
                        } 
                        else 
                        { 
                                Link->X = x; 
                                Link->Y = y; 
                                Link->Dir = dir; 
                                Link->DrawXOffset -= Cond(Link->DrawXOffset < 0, -1000, 1000); 
                                Link->HitXOffset -= Cond(Link->HitXOffset < 0, -1000, 1000); 
                                Link->HP -= HOLELAVA_DAMAGE; 
                                Link->Action = LA_GOTHURTLAND; 
                                Link->HitDir = -1; 
                                Game->PlaySound(SFX_OUCH); 
                                if(Game->GetCurDMap()!=dmap || Game->GetCurDMapScreen()!=scr) 
                                        Link->PitWarp(dmap, scr); 
                        } 
                        NoAction(); 
                        Link->Action = LA_NONE; 
                } 
         } 
         else if(Link->Z==0 && OnPitCombo() && !Warping) 
         { 
                        Link->DrawXOffset += Cond(Link->DrawXOffset < 0, -1000, 1000); 
                        Link->HitXOffset += Cond(Link->HitXOffset < 0, -1000, 1000); 
                        int comboflag = OnPitCombo(); 
                        SnaptoGrid(); 
                        Game->PlaySound(Cond(comboflag == CF_PIT, SFX_LINK_FALL, SFX_LINK_LAVA)); 
                        lweapon dummy = CreateLWeaponAt(LW_SCRIPT10, Link->X, Link->Y); 
                        dummy->UseSprite(Cond(comboflag == CF_PIT, WPS_LINK_FALL, WPS_LINK_LAVA)); 
                        dummy->DeadState = dummy->NumFrames*dummy->ASpeed; 
                        dummy->DrawXOffset = 0; 
                        dummy->DrawYOffset = 0; 
                        Falling = dummy->DeadState; 
                        NoAction(); 
                        Link->Action = LA_NONE; 
        } 
} 


I can't promise anything without a deeper analysis, but that at least has waitframe() inside your while loop and may stop the game from crashing; it may also stop other things from working, as I don;t know what each of these things is doing yet. (I suggest commenting anything that you can.)


Edited by ZoriaRPG, 02 August 2013 - 11:18 AM.


#17 Binx

Binx

    Formerly Lineas

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

Posted 02 August 2013 - 12:14 PM

Well, I'm about 90% certain that the first global I plugged into the game was the lava/pit function, so the position of the waitframe () in it shouldn't have changed since I last plugged it in.

 

What's nesting?

 

Also, I tried to comment everything, unless I didn't know what it does (like that short snippet of code  outside of the while (true) loop), but it shouldn't be outside of the while loop, cuz all I did was add three more chunks of code to the very beginning of the while loop, and it was originally part of said loop.

EDIT: Yeah, that didn't solve the problem at all, it just made my lava script not work, either on top of the attack ring not doing anything. That whole section of code should be PART of the while loop (which means the waitframe () is in the right spot,) but something else is making it think the loop is over. An extra RBrace, maybe? but yeah, everything before the waitframe () in the code I posted SHOULD be part of the while (true) loop, so if the while (true) loop isn't affecting that whole section, that's what needs to get fixed.

 

FURTHER EDIT: Come to think of it, the holelava script was working just fine, the only thing that was failing is the attack ring script, so the waitframe () CAN'T be outside of the while (true) loop, because otherwise the lava wouldn't work, and the ONLY script that is currently not functional is the attack ring script. It's not my formatting, it's not my positioning, it's the attack ring script, and ONLY the attack ring script. I just tested this theory with the backup I made right before plugging your code into my script, and the only thing that doesn't work is the attack ring.

 

STILL FURTHER EDIT: other than this

//Stops enemies from dropping ammunition items that Link doesn't have a way to carry (Bomb bag, quiver, etc.).
			for ( int i = 1; i <= Screen->NumItems(); i++) 
			{ 

				item drop = Screen->LoadItem(i);
				if ( (drop->ID == I_ARROWAMMO1 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_ARROWAMMO10 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_ARROWAMMO30 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_ARROWAMMO5 && !Link->Item[I_QUIVER1])
				|| ( drop->ID == I_BOMBAMMO1 && !Link->Item[I_BOMBBAG1])
				|| ( drop->ID == I_BOMBAMMO4 && !Link->Item[I_BOMBBAG1])
				|| ( drop->ID == I_BOMBAMMO8 && !Link->Item[I_BOMBBAG1])
				|| ( drop->ID == I_BOMBAMMO30 && !Link->Item[I_BOMBBAG1]) )
					Remove (drop);
                    //hard-coded Self-upgrading drops
                if ( (drop->ID == I_SWORD1 && !Link->Item[I_SWORD1])) 
                    Remove (drop); //This checks if you have the wooden sword, if not, it removes the drop
                if ( (drop->ID == I_SWORD1 && Link->Item[I_SWORD1]))
                    drop->ID = I_SWORD2; //This checks if you have the wooden sword, if you do, it changes the picked up item to the white sword
                if ( (drop->ID == I_SWORD2 && Link->Item[I_SWORD2]))
                    drop->ID = I_SWORD3; //THis checks if you have the white sword, if you do, it replaces it with the magic sword
                if ( (drop->ID == I_SWORD3 && Link->Item[I_SWORD3]))
                    drop->ID = I_SWORD4;  //This checks if you have the magic sword, if you do, it replaces it with the master sword 
                
                //Attack Ring script body
                for(int i = 1; i <= Screen->NumLWeapons(); i++){
                lweapon weap = Screen->LoadLWeapon(i);
                if(weap->Misc[MISC_WEAP_BOOSTED] == 0){
                    weap->Damage *= ATTACKRING_POWER;
                    weap->Misc[MISC_LW_BOOSTED] == 1;
                }
            }
		

I made no other changes to the global, I just added these snippets to the beginning of the while (true) loop. Everything else, including the positioning of the waitframe, is EXACTLY how Lord Volcanon wrote it. And each time I added stuff, it worked just fine. The only problem I've had is with the attack ring, I was already using the whole script, just as I have it written, with the only exception being that I didn't use the attack ring (because I didn't have it, before)


Edited by Lineas, 02 August 2013 - 12:33 PM.


#18 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 August 2013 - 12:54 PM

Does the attack ring script work the way I positioned waitframe()? If not, roll it back to how it was before, and post that and I'll see if I can find the best spot to include the attack ring code.

If the attack ring works the way I changed that, will try to get the additional portion working for you, but not knowing what each potion is supposed to do, and what relates to what in your game, I may break other things mending this.

Nesting means placing one set of code inside another, such as:
 

if(Falling) 
        { 
                Falling--; 
                if(Falling == 1) 
                { 
                        int buffer[] = "holelava"; 
                        if(CountFFCsRunning(Game->GetFFCScript(buffer))) 
                        { 
                                ffc f = Screen->LoadFFC(FindFFCRunning(Game->GetFFCScript(buffer))); 
                                Warping = true; 
                                if(f->InitD[1]==0) 
                                { 
                                        f->InitD[6] = x; 
                                        f->InitD[7] = y; 
                                } 
                        } 
                        else 
                        { 
                                Link->X = x; 
                                Link->Y = y; 
                                Link->Dir = dir; 
                                Link->DrawXOffset -= Cond(Link->DrawXOffset < 0, -1000, 1000); 
                                Link->HitXOffset -= Cond(Link->HitXOffset < 0, -1000, 1000); 
                                Link->HP -= HOLELAVA_DAMAGE; 
                                Link->Action = LA_GOTHURTLAND; 
                                Link->HitDir = -1; 
                                Game->PlaySound(SFX_OUCH); 
                                if(Game->GetCurDMap()!=dmap || Game->GetCurDMapScreen()!=scr) 
                                        Link->PitWarp(dmap, scr); 
                        } 
                        NoAction(); 
                        Link->Action = LA_NONE; 
                } 
         } 

The if statements are nested inside each-other (if->if->if->if), so those conditions only apply if the parent condition is in effect. this example from your global script is a three-level-deep nesting of if statements. There's nothing wrong with doing this; in fact it's important to be able to do this, but if the code that supports it isn't attached to it in some way, it won't work, and if you include code outside of a loop or closed circuit of any kind, it won't be executed with it. That would naturally make sections of code that belong inside the while loop fail to execute, if I understand the way ZASM works.
 
I have found ZASM very picky about things that bewildered me, such as the ordering of imports, the ordering and placement of constants and other minutiae. MM's One Ring script, for example, places the required bool arguments inside the global script, before the while loop, but inside the void run() command. I found that no-matter what I did, ZASM refused to compile it when the bool arguments were placed that way, and I had to place them at the top of my main script, with my other constants. Note that the only references to these booleans was inside the global script that was imported, and then later in an imported script at the end of my main script; yet ZASM insisted that they were undefined, despite being clearly loaded in the imported scripts before being called by anything.
 
This is a quirk of the compiler, and I don't understand why it is so picky, but that's what we have, so we live with it. At other times, the compiler follows all instructions in exact sequence, and some it handles seemingly at random.
 
Please keep in mind though that I can't make any promises here. I'm afraid to touch or re-arrange any of the statements, as to prevent breaking anything. I do suspect that this is an ordering issue, more than any fault in the attack ring script. In fact, the attack ring script to me seems to be missing elements that I would anticipate to control the effect. It's so simple, it's brilliant, although it relies on weapon-misc. attributes, which can be a problem (to my knowledge), based on the ass of the item.
 
I might use a modified version of this that needs to be activated to use it, and merely affects all LWeapons while in use (costing heaps of MP).
 
Anyhow, the simple thing to do is replace (in your original script) this:
 

//Stops enemies from dropping ammunition items that Link doesn't have a way to carry (Bomb bag, quiver, etc.).
			for ( int i = 1; i <= Screen->NumItems(); i++) 
			{

...with this:
 

for(int i = 1; i <= Screen->NumLWeapons(); i++){
                lweapon weap = Screen->LoadLWeapon(i);
                if(weap->Misc[MISC_WEAP_BOOSTED] == 0){
                    weap->Damage *= attackRingPower;
                    weap->Misc[MISC_LW_BOOSTED] == 1;
                }
            }
			
//Stops enemies from dropping ammunition items that Link doesn't have a way to carry (Bomb bag, quiver, etc.).
	for ( int i = 1; i <= Screen->NumItems(); i++) 
			{

Placing this at the top of your while loop, and then of course, adding the constants for it at the top of your main script, right after import "std.zh" and any other imported headers that you use, thus:

 

import "std.zh"
const int MISC_LW_BOOSTED = 0; //Weapon->Misc[] slot for boosted weapons
float attackRingPower = 1; //Global variable; gets changed by attackRingPickup

`Let me know if that works.



#19 Binx

Binx

    Formerly Lineas

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

Posted 02 August 2013 - 01:29 PM

Oh, i get it. Ok, well, the attack ring scripts still didn't work when  the waitframe () was moved, sorry.

 

Here's my pre-attack ring script (it doesn't have the upgrading drops, but those are easy as hell to implement.)

Personally, given the fact that it freezes without the line of code meant for the hardcoded version, and doesn't work WITH it (because then the levels don't affect each other), I think there's some kind of communication breakdown between the item script and the global, but that could just be that I placed it wrong, or forgot a line of code I needed, or placed one (or more) lines that weren't needed. I wonder if I could just hard-code the script instead, and assign each item separately... Of course, I never actually tested the hard-code version, so i dunno if it works, that way, either...

Oh, I also tried moving that piece of code the way you had it, no dice.

 

Oh, yeah, placing the waitframe() where it was before I moved DOES in fact make the lava combos work, so the waitframe() is definitely inside the while(true) loop

 

EDIT:

 

 

I might use a modified version of this that needs to be activated to use it, and merely affects all LWeapons while in use (costing heaps of MP).

 

Wait... This script isn't supposed to affect all LWeapons the way it is? Which weapons is it supposed to affect, then? I mean I'd hate to find out that it hasn't been working because I've been testing it with the wrong items, or something...


Edited by Lineas, 03 August 2013 - 03:29 PM.


#20 Binx

Binx

    Formerly Lineas

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

Posted 02 August 2013 - 06:04 PM

YAY! I GOT IT WORKING!!! Sorta.... It seems like that hard code functions as intended, when I plugged in the two extra lines of code from the original script that had no levels, but it seems kinda spotty. The sword itself doesn't do double damage, for example, but the sword beams insta-kill (I tested them on blue octos, 4HP; fire octos, 8HP and bomb octos, 20HP; it one hit killed all three). Except when they don't. Which happens sometimes, then it takes like 8-12 attacks to kill a blue octorok. Anyways, here's my code in it's current (semi) functional state

I mean, it doesn't do even CLOSE to what it's supposed to, but it does SOMETHING! and that's better than nothing, right?


Edited by Lineas, 03 August 2013 - 03:27 PM.


#21 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 03 August 2013 - 08:10 AM

I'll take a look at this on Sunday and see if I can clean it up and get this to work; I'm going to have to add the attack ring into my game to check the code for it and see if I can make it work, and if I can, I can get it going for you as well. If you can upload a demo of your game so that I can see what it is doing (or not doing), that may be helpful.
 
The problem may be that some weapons have a Weapon(Misc)[0] at a value greater than a value of '0'. If you look at the script, if a weapon's Misc[0] (Misc. 1 in the item editor) is exactly zero, then the attack ring applies. The value of a sword's Misc[0] is the 'Beam Hearts', so the value is '100' by default, meaning that the script won;t double the damage fro the blade itself.
 
It might work if you change it to this:
 

   while(true) 
                {
          if(Link->Item[I_ATTACKRING]){ 
			for(int i = 1; i <= Screen->NumLWeapons(); i++){
                lweapon weap = Screen->LoadLWeapon(i);
                weap->Damage *= attackRingPower;
                   

Ridding yourself of the if statement means that as long as Link has the attack ring, every LWeapon will gain the damage multiplier as specified. I don;t know if you can call for attackRingPower in this way; I would probably have done this as a command in your while loop, making a subscript of void(attackRingPower), and then an item script to execute it, but this should work. My way is probably overcomplicated, however if the value of attackRingPower isn't being passed by your item pickup to the game, then it would be a problem.
 
That if statement is what I was commenting about before, regaring not affecting all LWeapons, as the script relies on the item's Misc. attributes, and these vary by class (see: http://www.shardstor...isc._Attributes).
 
In the case of this, by setting
 

const int MISC_WEAP_BOOSTED = 0; //Weapon->Misc[] slot for boosted weapons
int MISC_LW_BOOSTED = 0;

 You are saying that the item editor Misc Attribute 1 must equal zero for the item script to affect it. because for the sword, the default for Misc 1[0] is 100, (reflecting 100% health for beam hearts), the script doesn;lt affect it, as Misc[0] == 100, not == 0. 

 

This can also be further confusing as the editor starts counting at 1, but ZASM counts from zero, so 0 = 1 for most calls, just as with NPC->Misc, whicn in the enemy editor is listed as 1-12, but when coding, the values are 0-11)

 

This is why I don;t advocate calling functions via item Misc attributes, as you cannot set these for many items, or any custom class or zz class items. I prefer to call for effects by LWeapon type; this you could use something like

 

if (lType) == (LW_ARROW) -- or however the appropriate arrangement would be to call that. You could make a list of specific types with an if with pipes:

 

if ( (lType == (LW_ARROW) | (lType) == (LW_MAGIC) | (lType) == (LW_SWORD) )

 

That kind of statement (and yes, I know it is only partly helpful as I don;t recall of the tip of my hat how to phrase this kind of call) would allow you to specify the types of LWeapons that are multiplied without relying on attributes that you cannot control.

 

(If there is a way to control misc. attributes for items, I have never heard or read of it.)

I could probably devise a solution that works for you based on this, but not in a single day, or even necessarily this week due to my present workload, but I had a couple ideas on this that might evolve into something you would want. I may be able to have something for you by Wednesday, but today I've a Guild meeting (and it;s Shabbat as well), and I have some work to do on Monday, so I will have to squeeze it in somewhere between the two, and work on it during the week when I have the time.

 

If you remove the requirement, in any event, it should multiply everything by the value set. If the item is not interacting with the global script, that may be another issue for me to decipher.

 

On another note, you seem to have combined everything into one massive script, with ffc scripts at the top. When I work on this, i will try to organise your script and control it via imports, as this not only eases debugging, but it makes compiling easier for you (as I learned) by calling everything possible with an import command. That way, you only need to reload your buffer when you change a constant.



#22 Binx

Binx

    Formerly Lineas

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

Posted 03 August 2013 - 09:12 AM

Ok, well, that totally explains what my problem was with the sword blade, but not the beam.  So I tried what you recommended, and removed the if statement, and it froze the game (I tried it like 8 different ways, but it always amounted to the same, it needs to call on those misc attributes in order to function at all, otherwise it just freezes the game), so I rolled it back and removed the attack ring pickup script, then changed the beam hearts value on the sword to 0, and.... It's still doing the same thing, it just seems to make the damage really wonky. As far as the demo is concerned, I'm actually just using a test quest right now, cuz it takes a while to get to where the tough enemies are in my main quest, the test quest is just 4 screens. Link has the attack ring and wooden sword  in the init data, then a screen with one blue octo, a screen with one fire octorok, and a screen with one bomb octorok.  It's really very basic, since I only have to test the one script, right now. I suppose you could use any sets of enemies, as long as you can keep track of exactly how much HP they have, and how many strikes it takes to kill them. You could probably recreate it yourself in less time than it would take me to upload it (Besides, my main quest is currently at one of those totally unplayable midpoints, where a bunch of stuff is only half-implemented) I tried rearranging things for you, hopefully it'll be easier to read, so, here ya go: 

 

PS. if there are any dumb mistakes or things I overlooked, please forgive me, it's 7:10 am, and I've not been to sleep, yet. Anyways, have a good Shabbos :)


Edited by Lineas, 03 August 2013 - 03:25 PM.


#23 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 03 August 2013 - 03:08 PM

@ZoraRPG: I really don't think that's it - LWeapon->Misc[] and ItemData->Attributes[] are two different things. That shouldn't make a difference. Just to be safe, though, you're free to set MISC_LW_BOOSTED to any other number up to 7. LWeapon->Misc[] always starts out at all 0's.

 

@Lineas: Why are you still trying to use both versions of my script at once? You're only meant to use one and I'm pretty sure that's throwing everything off. Try out this tidied version of your script and START A NEW SAVE FILE in ZC.

 

Also, please use [ hidden ] tags (without the spaces) around your script so it doesn't fill up the page.

 

EDIT: Well, crap. I made a mistake and it doesn't work on swords anyway. Really sorry about that.

Okay, plan C: Attach this script to a normal Whimsical ring, with chance 1 and damage bonus whatever (not 255, probably). That will force it to affect swords. Then for the script, take everything out of the old one and use this (and only this one, not parts of the old ones mixed with it):

Updated script again



#24 Binx

Binx

    Formerly Lineas

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

Posted 03 August 2013 - 03:23 PM

When I first plugged in the altered script from page 1, if froze my game, so I was tinkering with it until it made the game work, which pretty much was when I used the old global with the new item pickup code. It still didn't work right, but at least it didn't freeze the game. So I just kept using it in the non-freezing-my-game form. Anyways, nope still same problem (And I literally copied over the exact script form your post into a new text file than overwrote my .z file) , unaffected sword, one hit kill beams.

 

Thanks for the tip about hiding the text, I'd been wondering how to do that.



#25 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 03 August 2013 - 03:26 PM

Big, important edit in last post ^^^



#26 Binx

Binx

    Formerly Lineas

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

Posted 03 August 2013 - 03:45 PM

Ok, now the beam works right, but the blade still does normal damage (Although the damage bonus for the ring itself is set to 0, should I be using that to change the melee damage?)

 

EDIT:Also, it's no problem about the swords thing, mistakes happen, you're doing this for free (so I don't have much space to complain, anyways) and it's actually pretty funny how long we spent on this and it only occurred to me in vague passing that the script just might not work on swords.

 

EDIT EDIT: Yeah, when I set the bonus damage correctly it worked beautifully, but the bonus damage has to be set to attackRingPower - 1 to work properly. Thanks a lot, MM, now I can move on to the next group of global scripts I need to work on: The globals for all my elemental swords.


Edited by Lineas, 03 August 2013 - 04:00 PM.


#27 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 03 August 2013 - 04:08 PM

Glad you finally got it working! Good luck with your elemental swords!



#28 Binx

Binx

    Formerly Lineas

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

Posted 03 August 2013 - 04:16 PM

Thanks, and thanks again for the help, and thanks again for the wind blade script you shared with me a while back.

 

EDIT: Oh, shoot, one more thing: This script only affects projectiles for LW_SWORD, right? How would I alter it to make it affect all LWeapon projectiles? Cuz I think I'll have to change the projectiles on at least a few of them to an LW_SCRIPT or LW_MAGIC class, but I don't want to sacrifice the boost.


Edited by Lineas, 03 August 2013 - 04:20 PM.


#29 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 03 August 2013 - 04:39 PM

It alters all weapons, projectiles included, that are not swords.



#30 Binx

Binx

    Formerly Lineas

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

Posted 03 August 2013 - 04:40 PM

Oh... Yeah, there's a ! there... I should have realized that. Wow, that was kinda a dumb question, lol.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users