Jump to content

Photo

Scripted armor


  • Please log in to reply
47 replies to this topic

#16 justin

justin

    Adept

  • Members

Posted 02 April 2015 - 07:36 AM

You don't need the pickup scripts to run, when you silently add the armor items as part of your character changing code you also have your armor code.

And ya, you can hold up whatever you want. You don't need to though if you don't want to.

#17 Binx

Binx

    Formerly Lineas

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

Posted 02 April 2015 - 09:01 AM

well, yeah, I get that, but if I want to have different armor classes, i.e. heavy armor for some light for others, etc. as well as multiple armor levels, wouldn't I have to assign ArmorPower during every character change? I mean, yeah, if they all just had one armor powerup that they share, I could just assign the varying armor classes in the switching script (and that's where I was planning to place the ArmorType variable, anyways) and be done with it, but I was planning on having three armor sets per character. And besides, wouldn't I have to generate the ring item (the stand-in for the character item) on top of Link every time, so that the game will re-check the ring's "power"? 



#18 justin

justin

    Adept

  • Members

Posted 02 April 2015 - 09:06 AM

No, the item power can be changed while equipped or worn.
I don't know what you mean by ArmorPower and ArmorType. Those are scripted variables that I'm unclear how they are being used or assigned. But since they are scripted and I'm sure being calculated in some fashion then you could easily just assign them as the ring->Power when your change character.

#19 Binx

Binx

    Formerly Lineas

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

Posted 02 April 2015 - 10:47 AM

I mentioned those variables a few posts ago. ArmorType would be set to a value of 0.5, 0.75, 1,or 1.5 depending on the type of armor worn (none, light, medium, heavy, this part could easily be folded into the character script) and ArmorPower would be set to 1, 2, 4,or 8, depending on the level of additional armor (since each character will have their own armor slot, and three levels of armor, this needs to have a separate item, I believe). Then, I'd set another variable "Defense" which would be the product of the previous two variables (Defense = ArmorType * ArmorPower) and the script attached to the character ring item would set "Itemdata->Power = Defense", but you're saying the only item I'll have to spawn on top of Link is the armor that contains the "ArmorPower" variable, right?



#20 justin

justin

    Adept

  • Members

Posted 02 April 2015 - 11:57 AM

you don't need to spawn the item on link.  i'm saying just set ring->Power = ArmorType * ArmorPower when you change the character.  you can store each character's ArmorType and ArmorPower with arrays or something.



#21 Binx

Binx

    Formerly Lineas

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

Posted 02 April 2015 - 01:36 PM

But, if I set that armortype and armorpower via switching characters, isn't that going to lock me into a single suit of armor per character? I'm sorry, I know we're going in circles, here, but I don't see how we're supposed to give each character multiple armors (3 armors * 10 characters + base armor for each character, 40 armors total) and still set the "armorpower" variable in the character switching.



#22 justin

justin

    Adept

  • Members

Posted 02 April 2015 - 02:04 PM

doesn't seem complicated to me, but then again, i'm not entirely sure what your armorpower and armortype variables are doing, and why there are two of them.

 

if you post up your code we could probably work through this a lot easier.  

 

some things i don't understand...

 

1. are the armors supposed to look different?  

2. does armortype have a purpose beyond setting the defense level?  

3. how are the characters picking up or gaining the new armortypes / armorpowers?

4. you want this to be independent of the ring palette change correct?  so each character has a ring that sets their palette, and also a LTM item that sets their sprite?  and we want to modify the ring->Power by script based on the ring->Power = ArmorPower * ArmorType formula?

5. does each character have it's own array of items and attributes?



#23 Binx

Binx

    Formerly Lineas

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

Posted 02 April 2015 - 02:23 PM

1. Most likely, since they'll be using LTMs rather than color changes

2. Not really, in D&D terms, it's basically the same as "Armor Proficieny", (so, it's purpose is less "armor item" and more "this defines what kinds of armors each character can use and their base defense", since even without armor, a mage is probably going to be more vulnerable to physical assault than a Paladin) for example suit of full plate mail will have an ArmorType value of 1.5, and an ArmorPower value of 8. This would mean it's a third level armor (equivalent defense to the gold ring) so the total defensive power would be 12. On the other hand, a set of cloth wizard's robes would have an ArmorType value of 0.75 for light armor and a value of 2 for Armor Power(equivalent to the blue ring), so the equation would result in a return of 1.5. Essentially, Light armor would increase damage by 25% while heavy armor would reduce it by 33%, (which is why it can easily be folded into the character switch)

3. By picking them up, either as treasure,or from a shop.

4. Almost, the Ring item sets the palette AND the LTM, these items would contain additional LTMs, however so that the appearance of better armor suits can be used. Otherwise yeah we want to set the power of the ring exactly like that.

5. Yeah, that's the plan. Each character will have their own inventory, their own heart containers, their own magic meter, stats (though I'm not entirely sure how I'm going to implement stats, yet), levels, etc.


Edited by Binx, 02 April 2015 - 02:25 PM.


#24 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 02 April 2015 - 04:04 PM

I wrote a script a while ago that had a basic implementation of stats. It worked by watching for changes in both enemy and player HP, then modifying the HP values directly in accordance with arbitrary stat formulas. Another possible approach is to modify weapon and armor Power values, like you were talking about, although this approach is significantly less granular.


  • Binx likes this

#25 Binx

Binx

    Formerly Lineas

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

Posted 02 April 2015 - 05:37 PM

I was thinking more along the lines of your standard RPG stat table: Strength (would affect damage given, I already actually know how to do this one), Speed, Stamina (Would affect max HP, since I'm doing away with Heart Containers, anyways, easy enough, can script that, too), Fortitude (Would be a base "toughness" factor for calculating damage, on top of armors,probably not that hard to script) Intelligence (Higher intelligence = lower MP costs), and Wisdom (Essentially the same as Stamina, but for MP), but rather than random rolls, each character class would have predetermined "primary", "secondary" and "dump" stats. Cuz,seriously, it would blow to choose a character, only to find that they rolled low in their critical areas. Honestly, I wanted to do "Charisma" as a stat,but I can't see how that would be useful, unless I were to actually implement role-playing elements that would be affected by such a stat, and I don't see myself doing that, at least not for this quest. The rings/armor issue is more so I can set differing types of armor in the quest, for different classes. A wizard, for example, is probably NOT going to have nearly the kind of armor that a paladin would.



#26 Binx

Binx

    Formerly Lineas

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

Posted 07 April 2015 - 12:10 PM

doesn't seem complicated to me, but then again, i'm not entirely sure what your armorpower and armortype variables are doing, and why there are two of them.
 
if you post up your code we could probably work through this a lot easier.  
 
some things i don't understand...
 
1. are the armors supposed to look different?  
2. does armortype have a purpose beyond setting the defense level?  
3. how are the characters picking up or gaining the new armortypes / armorpowers?
4. you want this to be independent of the ring palette change correct?  so each character has a ring that sets their palette, and also a LTM item that sets their sprite?  and we want to modify the ring->Power by script based on the ring->Power = ArmorPower * ArmorType formula?
5. does each character have it's own array of items and attributes?

Oh, I see the "If you post up your code" line, now. I don't have a code. That's why I posted this in the requests forum. I wrote a pseudocode on the last page, but it was basically absolute bunk.

#27 justin

justin

    Adept

  • Members

Posted 07 April 2015 - 09:45 PM

i meant your existing code, like your character system and such.



#28 Binx

Binx

    Formerly Lineas

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

Posted 07 April 2015 - 11:50 PM

Oh... Well, I don't really have that, yet, either. I'm still in the planning stages, all I really have as of now is the classes, elemental and armor proficiencies and a vague idea of how I'm going to script the level and class system based on what I'm doing in Destiny's Song and a quick glance over ZoriaRPG's RPG system header. None of it has been scripted yet, mainly since it mostly will involve arrays, and I still really don't understand how to use those.

 

If it helps, I can write those down, though:

 

 

Like I said, that's all I got.I have yet to even figure out how I'm going to handle XP and leveling, yet.



Random note, I may need a better idea for speed, I suddenly have an image of  an out of control PC running into every pit, pool, and lava flow he sees, because he moves too fast to control.

 Complete with The Benny Hill Show theme.


Edited by Binx, 07 April 2015 - 11:53 PM.


#29 Binx

Binx

    Formerly Lineas

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

Posted 20 April 2015 - 02:16 PM

So... sort of on topic, but sort of not, how hard is tango.zh to use, realistically? I got a pretty cool idea for an equipment subscreen, for use with equippable/unequippable items, like armor or shields with varying effects, and designed for use with piecemeal armor, like so (Apologies in advance for the terrible art about to be inflicted upon your eyes):

 

 

Now, that is something I could easily do with a built-in subscreen,dummy items and some very simple scripting, but I run in to three problems: The first  is that in order to switch armor pieces, you'd have to go to the subscreen, choose the item, go down to the normal screen, use the item assigned, and THEN it would switch (which,while technically more realistic, would be very tedious), and the second is that there's no room on the subscreen for anything else, like a map, or weapons or non-armor equipment, so, it seems my only option is to create a second subscreen with tango.zh, which I've never used, but it looks way over my head, from a quick read-trough of the header file. The third problem,is not subscreen-related, but is an issue with making the armors show up properly on the player sprite.

So, yeah. I guess I have a few questions about that, like: How feasible is character creation and piecemeal armor? Will I have to make a billion Link sprites to cover all the possibilities shown, or is there a way I could sprite the individual armor pieces/hairstyles, etc, then just layer them over the Link sprite,which would be reduced to basically a bald, naked man?

 

 

So, basically Krillin, but naked and not quite as lame. 


Edited by Binx, 20 April 2015 - 02:17 PM.


#30 Binx

Binx

    Formerly Lineas

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

Posted 30 April 2015 - 04:46 PM

Back on topic, three things: Apparently I could have totally done this without scripting, with peril rings. But, the more I think about it, simply adding HP back seems like it would give much more creative control, and also, justin, are you sure i can just set the power via script, I was led to believe ItemData for power is read-only.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users