Simblesse Oblige Forum Index Simblesse Oblige
Forums for serious Simmers to share knowledge about The Sims 1
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Useable Sword and Bow

 
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Suggestion Box- A Wish List ONLY
View previous topic :: View next topic  
Author Message
Ukiyo
Member
Member


Joined: 26 Sep 2010
Posts: 41

PostPosted: Wed Jun 29, 2011 12:38 pm    Post subject: Useable Sword and Bow Reply with quote

Basically I would love to have a sword and bow that you could actually use for fighting. I was thinking for the sword it would work something like this (sorry if the calculations are confusing, it's the only way I could think to write them):

Code:
Attack
  A.Chance = (A.S - B.S)
    If(A.Chance < 0)
      A.Chance = 0
    Else
      return
  A.Match = random(1,10)
  If A.Chance > A.Match
    Win
  else
    Lose


Variables:
A. = User Sim
B. = Opponent
S = Body Skill

For the bow, something like this:
Code:
Attack
  A.Shot = random(1,10)
  If A.S > A.Shot
    Hit
  else
    Miss

Variables:
A. = User Sim
B. = Opponent
S = Logic Skill

I figure the sword could use the animations from Superstar, and the bow could use animations from Vacation. Also I would prefer if when a Sim got hit it used a calculation similar to this:

Code:
Death
  B.Lifeforce = random(1,5)
  if b.lifeforce = 1
    kill
  else
    b.energy = 0


That way there's a 1-in-5 chance of fatality, and only a knockout otherwise. Also, it would be nice if certian sims could be made to do duels instead of dust-clouding when they get upset at sims, maybe by giving them an inventory object or something.

I know this is just a pipe dream, but I wanted to get it out there. Just in case someone might know how to do this, or explain how to me how to do it myself.
Back to top
View user's profile Send private message
VivianLee
Member
Member


Joined: 01 Sep 2006
Posts: 721
Location: The Land of 10,000 Lakes

PostPosted: Thu Jun 30, 2011 3:32 am    Post subject: Reply with quote

How about fencing? http://www.somesimthings.com/Skill/02Skill.htm

There's a Japanese site that has (or had) a bow and target, but I don't recall the name. I'm sure someone else will though.
Back to top
View user's profile Send private message
Ukiyo
Member
Member


Joined: 26 Sep 2010
Posts: 41

PostPosted: Thu Jun 30, 2011 5:23 am    Post subject: Reply with quote

The problem with those is that they're interactions between a sim and an object (Sim and Fencing Mat, Sim and Target), what I'm talking about is interactions between two sims. Also, I really want the possibility of fatality. Nothing says "stay away from my family" quite like death.

Also, was this the site you were talking about?
Back to top
View user's profile Send private message
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4072

PostPosted: Thu Jun 30, 2011 4:29 pm    Post subject: Re: Useable Sword and Bow Reply with quote

Ukiyo wrote:
I know this is just a pipe dream, but I wanted to get it out there. Just in case someone might know how to do this, or explain how to me how to do it myself.


There's not "short" way of explaining how to do it. If you have a less broad question I'm sure we could offer some help, though.

To get the the point of having a less broad question you'll need to get to know SimAntics, the language used to program Sims Objects.
Grapholina's Entry Level Hacking lessons (ELH) are a great introduction:

http://woobsha.com/SimsCollegeArchive/
http://woobsha.com/SimsCollegeArchive/ELHindex.html

(read the first four pages of Intermediate level as well for a description of the variables used. & Lesson four in ILH plays with the random function a little.)

People make the mistake of skimming through it believing it's too slow or basic for them and then hitting a bit of a wall in ELH's part 4. It isn't slow. It simply has a ramp up time allowing everything to be thoroughly examined and giving it time to sink in.

If you are a mac user you'll be using IffSnooper, instead of IffPencil.
Peter wrote something up to help follow the Sims College lessons a little better in that case
http://homepage.mac.com/petergould/IFFS/BHAV/bhav1.html
(IffSnooper has received several updates since then, but I assume the basics are the same even if the UI or Text has changed.)

After using tutorials to get a basic grasp of SimAntics we all basically root around in objects that seem similar to our own projects. Maxis' own fightcloud.iff , for example, might make an excellent study. It not only coordinates 2 Sims, I believe it does compare one Sim's body skill to another to determine the victor. You'd need to tweak the numbers to suit your needs, perhaps inject the random component, and change the outcome from Stomping Off to Death or Defeat.

You also need to figure out a way to initiate the fight, though.
The easiest way is to make an object one clicks on with a "Challenge" interaction, like one does with the Magic Town arena. This clickable object would then act as the controller, controlling both Sims (again, like the arena, or a chess board, or a hot tub, or a snuggle sofa, to give a few examples)

Alternatively, you can employ Atavera's method of custom interactions, the details of which have long since been lost (/mourn Hacker's Resource) but the gist of it is to clone a gift inventory token and modify it's text, animations, and impact on motives and relationships creating what appears to be an entirely new social interaction, showing up on the interaction menu when you click another Sim thanks to Hot Date's "Give..." interaction. This technique allows us to distribute custom social interactions without hacking the personglobal.iff. The downside is that while HDSI_give.iff (Hot Date's "Give..." interaction) leaves a lot of the "controlling" to the inventory token, it does toss some of it's own in afterward, most notably by automatically triggering jealousy. So an anti-jealousy patch of some sort is needed to keep things from getting ... stupid. (In my game I've hacked HDSI_give.iff so it specifically asks the inventory token if it should trigger jealousy. Now any custom interaction I make or install that does not return True wont trigger any jealousy but anything I make that should will do so appropriately.)

(I gather there's a third technique involving clicking on the selected sim (or the selected sim's plumb bob), employed by someone who created a cellphone for Sims, but I've not seen this myself so will gloss right over that.)

To be less vague for a moment -

You'd probably want to use an attribute to represent the lifeforce, giving it an initial value (100? 1000?) and decreasing it appropriately as the fight progressed (or use Energy in it's place?).
Otherwise you risk a lucky kill shots as the fight opens which, while mighty impressive, may seem a bit out of place if your two fighters both have low body skill. If you equate their body skill with their strength then those with lower skill would hit for less when they did hit successfully, severely reducing the chances of an immediate killshot for them while leaving it higher for the more stronger fighter.

A tip on random numbers ... they aren't. I've found that whatever seed the game uses when calculating random numbers can seriously skew the results. To combat that I now use a very high number when rolling my random (though I guess it needn't be that high) and use the mod= operator on that to bring it back down to range I originally wanted. (The mod= operator divides your random number up by whatever value you tell it to and then returns the remainder.)
For example, I'd like to randomly choose between 4 cookies.
    Local Variable 0:=random from 0 to < 1280
    (let us presume 657 comes up)

    Local Variable 0 mod= 4
    (so it's 657/4 is 164 with a remainder of 1. The "1" is returned to Local Variable 0.)

The second cookie (#1 in a range between 0 and 3) is the cookie chosen.

Fantastic specifics and great idea thumbsup
EDIT: Should you decide to add knife fights in you are welcome to use the props Ruth (Bag of Tricks) and I came up with for our pirate tavern knife throw game. She designed the meshes especially for the dart board animations.

Quote:
Nothing says "stay away from my family" quite like death.
laugh
_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Ukiyo
Member
Member


Joined: 26 Sep 2010
Posts: 41

PostPosted: Thu Jun 30, 2011 5:27 pm    Post subject: Re: Useable Sword and Bow Reply with quote

Raeven wrote:

There's not "short" way of explaining how to do it. If you have a less broad question I'm sure we could offer some help, though.

Really that's why I labeled it a pipe dream, I know next to nothing on the innerworkings of the sims. I am trying to learn though.

Quote:
People make the mistake of skimming through it believing it's too slow or basic for them and then hitting a bit of a wall in ELH's part 4. It isn't slow. It simply has a ramp up time allowing everything to be thoroughly examined and giving it time to sink in.

Of course. No skill is easy to learn.

Quote:
You also need to figure out a way to initiate the fight, though.
The easiest way is to make an object one clicks on with a "Challenge" interaction, like one does with the Magic Town arena. This clickable object would then act as the controller, controlling both Sims (again, like the arena, or a chess board, or a hot tub, or a snuggle sofa, to give a few examples)

I was toying around with the idea of using a Renaissance-era standard as the control, so that you could possibly assign other sims to fight against someone else, (Like hiring a mercenary band to fight off a royal guerrilla unit) But at the same time I want to be able to just click on the opposing sim and select "Duel". Maybe if I get good enough I'll be able to do both.

Quote:
You'd probably want to use an attribute to represent the lifeforce, giving it an initial value (100? 1000?) and decreasing it appropriately as the fight progressed (or use Energy in it's place?).
Otherwise you risk a lucky kill shots as the fight opens which, while mighty impressive, may seem a bit out of place if your two fighters both have low body skill. If you equate their body skill with their strength then those with lower skill would hit for less when they did hit successfully, severely reducing the chances of an immediate killshot for them while leaving it higher for the more stronger fighter.

Well, the general idea was for body to represent the attacker's skill level at fencing, not strength. The idea of fencing is to strike strategically in certain spots in order to kill quickly, so strength isn't particularly important. (Actually, I was going to make the skill logic, but then I realized that I wouldn't have anything suitable for the bow) The general idea is that a more expericenced fencer would be able to almost always defeat his oponent, while a less experienced one would only be able to beat someone on his level or lower unless by fluke. Also, I didn't want the fights seeming too RPG-ish. There's no measure of HP in actual fencing, why add one to the simulated version?

Quote:
EDIT: Should you decide to add knife fights in you are welcome to use the props Ruth (Bag of Tricks) and I came up with for our pirate tavern knife throw game. She designed the meshes especially for the dart board animations.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Suggestion Box- A Wish List ONLY All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group