Users browsing this thread: 1 Guest(s)
Random Spellcast for Weapons

#1
Posts: 9
Threads: 2
Thanks Received: 0
Thanks Given: 7
Joined: Nov 2013
Reputation: 0
Status
None
Ran into another question while doing some experiments. This one is regarding random spells that proc from weapon attacks.

Is it possible to alter the rate of random spellcasts for a weapon?
For example, striking with the Flame Sabre would make the Fire proc happen 100% or whatever desired xx%. (I believe the actual rate in the game is 1 in 4?)

I ran into many entries regarding random spellcasts in the C2 bank, but I was having trouble finding a location that mentions the rates/percentages that could be edited.

Thanks.
  Find
Quote  

#2
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
It is set here, you just have to modify the value of the CMP instruction:

Code:
C2/3649: AD 89 3A     LDA $3A89
C2/364C: 89 40        BIT #$40   (is "cast randomly with fight" bit set in the
                                  weapon spellcast byte?)
C2/364E: F0 15        BEQ $3665  (if not, Exit function)
C2/3650: EB           XBA
C2/3651: 20 5A 4B     JSR $4B5A  (random #, 0 to 255)
C2/3654: C9 40        CMP #$40
C2/3656: B0 0D        BCS $3665  (if that # is 64 or greater, exit function.  iow, exit
                                  3/4 of time.)
  Find
Quote  
[-] The following 2 users say Thank You to madsiur for this post:
  • lopolly (12-04-2013), Robo Jesus (01-01-2018)

#3
Posts: 9
Threads: 2
Thanks Received: 0
Thanks Given: 7
Joined: Nov 2013
Reputation: 0
Status
None
Ah! So that's what that was. Good to know I was looking in the correct general area.

Thanks so much for the help as always.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite