Jump to content
Rpg²S Forum
  • 0

AIUTO: Pokemon Essentials Script ed eventi...


Gemini-air
 Share

Question

Buongiorno a tutti!!!!

Vi ricordate di me? Sono colui che, poco tempo fa, aveva dichiarato di voler creare un Remake dei giochi a tema Pokemon.

Beh sappiate solo che, da quando feci quella dichiarazione, mi sono messo al lavoro e sono riuscito a inserire elementi interessanti e accattivanti sia a livello grafico che a livello di storyline e, spero, per novembre di rilasciare una prima beta...

Tuttavia mi appello alle vostre conoscenze per alcuni fattori che, purtroppo, non mastico molto bene e che, spero, voi possiate aiutarmi.

Uno dei miei problemi è il seguente:

-Nell'Editor, precisamente la voce Encounters, permette di incontrare determinati pokemon in determinate mappe ed aree del gioco. Il problema è che in questa voce non c'è la dicitura "Erba" e, per aggiungerla, devo lavorare sullo script. Come faccio?

Qua sotto vi riporto lo script, nella speranza che possiate aiutarmi!

 

module EncounterTypes

Land = 0
Cave = 1
Water = 2
RockSmash = 3
OldRod = 4
GoodRod = 5
SuperRod = 6
HeadbuttLow = 7
HeadbuttHigh = 8
LandMorning = 9
LandDay = 10
LandNight = 11
BugContest = 12
Names=[
"Land",
"Cave",
"Water",
"RockSmash",
"OldRod",
"GoodRod",
"SuperRod",
"HeadbuttLow",
"HeadbuttHigh",
"LandMorning",
"LandDay",
"LandNight",
"BugContest"
]
EnctypeChances=[
[20,20,10,10,10,10,5,5,4,4,1,1],
[20,20,10,10,10,10,5,5,4,4,1,1],
[60,30,5,4,1],
[60,30,5,4,1],
[70,30],
[60,20,20],
[40,40,15,4,1],
[30,25,20,10,5,5,4,1],
[30,25,20,10,5,5,4,1],
[20,20,10,10,10,10,5,5,4,4,1,1],
[20,20,10,10,10,10,5,5,4,4,1,1],
[20,20,10,10,10,10,5,5,4,4,1,1],
[20,20,10,10,10,10,5,5,4,4,1,1]
]
EnctypeDensities=[25,10,10,0,0,0,0,0,0,25,25,25,25]
EnctypeCompileDens=[1,2,3,0,0,0,0,0,0,1,1,1,1]
end
class PokemonEncounters
def initialize
@enctypes=[]
@density=nil
end
def stepcount
return @stepcount
end
def clearStepCount
@stepcount=0
end
def hasEncounter?(enc)
return false if @density==nil || enc<0
return @enctypes[enc] ? true : false
end
def isCave?
return false if @density==nil
return @enctypes[EncounterTypes::Cave] ? true : false
end
def isGrass?
return false if @density==nil
return (@enctypes[EncounterTypes::Land] ||
@enctypes[EncounterTypes::LandMorning] ||
@enctypes[EncounterTypes::LandDay] ||
@enctypes[EncounterTypes::LandNight] ||
@enctypes[EncounterTypes::BugContest]) ? true : false
end
def isWater?
return false if @density==nil
return @enctypes[EncounterTypes::Water] ? true : false
end
def isEncounterPossibleHere?
if $PokemonGlobal && $PokemonGlobal.surfing
return true
elsif pbGetTerrainTag($game_player)==PBTerrain::Ice
return false
elsif self.isCave?
return true
elsif self.isGrass?
return pbIsGrassTag?($game_map.terrain_tag($game_player.x,$game_player.y))
else
return false
end
end
def pbEncounterType
if $PokemonGlobal && $PokemonGlobal.surfing
return EncounterTypes::Water
elsif self.isCave?
return EncounterTypes::Cave
elsif self.isGrass?
time=pbGetTimeNow
enctype=EncounterTypes::Land
enctype=EncounterTypes::LandNight if self.hasEncounter?(EncounterTypes::LandNight) && PBDayNight.isNight?(time)
enctype=EncounterTypes::LandDay if self.hasEncounter?(EncounterTypes::LandDay) && PBDayNight.isDay?(time)
enctype=EncounterTypes::LandMorning if self.hasEncounter?(EncounterTypes::LandMorning) && PBDayNight.isMorning?(time)
if pbInBugContest?
if self.hasEncounter?(EncounterTypes::BugContest)
enctype=EncounterTypes::BugContest
end
end
return enctype
else
return -1
end
end
def setup(mapID)
@density=nil
@stepcount=0
@enctypes=[]
begin
data=load_data("Data/encounters.dat")
if data.is_a?(Hash) && data[mapID]
@density=data[mapID][0]
@enctypes=data[mapID][1]
else
@density=nil
@enctypes=[]
end
rescue
@density=nil
@enctypes=[]
end
end
def pbMapHasEncounter?(mapID,enctype)
data=load_data("Data/encounters.dat")
if data.is_a?(Hash) && data[mapID]
enctypes=data[mapID][1]
density=data[mapID][0]
else
return false
end
return false if density==nil || enctype<0
return enctypes[enctype] ? true : false
end
def pbMapEncounter(mapID,enctype)
if enctype<0 || enctype>EncounterTypes::EnctypeChances.length
raise ArgumentError.new(_INTL("Encounter type out of range"))
end
data=load_data("Data/encounters.dat")
if data.is_a?(Hash) && data[mapID]
enctypes=data[mapID][1]
else
return nil
end
return nil if enctypes[enctype]==nil
chances=EncounterTypes::EnctypeChances[enctype]
chancetotal=0
chances.each {|a| chancetotal+=a}
rnd=rand(chancetotal)
chosenpkmn=0
chance=0
for i in 0...chances.length
chance+=chances
if rnd<chance
chosenpkmn=i
break
end
end
encounter=enctypes[enctype][chosenpkmn]
level=encounter[1]+rand(1+encounter[2]-encounter[1])
return [encounter[0],level]
end
def pbEncounteredPokemon(enctype)
if enctype<0 || enctype>EncounterTypes::EnctypeChances.length
raise ArgumentError.new(_INTL("Encounter type out of range"))
end
return nil if @enctypes[enctype]==nil
chances=EncounterTypes::EnctypeChances[enctype]
chancetotal=0
chances.each {|a| chancetotal+=a}
rnd=rand(chancetotal)
chosenpkmn=0
chance=0
for i in 0...chances.length
chance+=chances
if rnd<chance
chosenpkmn=i
break
end
end
encounter=@enctypes[enctype][chosenpkmn]
return nil if !encounter
level=encounter[1]+rand(1+encounter[2]-encounter[1])
return [encounter[0],level]
end
def pbCanEncounter?(encounter)
return false if !encounter || !$Trainer
if $PokemonGlobal.repel>0 && $Trainer.ablePokemonCount>0 &&
encounter[1]<=$Trainer.ablePokemonParty[0].level
return false
end
if $game_system.encounter_disabled || ($DEBUG && Input.press?(Input::CTRL))
return false
end
return true
end
def pbGenerateEncounter(enctype)
if enctype<0 || enctype>EncounterTypes::EnctypeChances.length
raise ArgumentError.new(_INTL("Encounter type out of range"))
end
return nil if @density==nil
return nil if @density[enctype]==0 || !@density[enctype]
return nil if @enctypes[enctype]==nil
@stepcount+=1
return nil if @stepcount<=3 # Check three steps after battle ends
encount=@density[enctype]*16
if $PokemonGlobal.bicycle
encount=(encount*4/5)
end
if $PokemonMap.blackFluteUsed
encount/=2
end
if $PokemonMap.whiteFluteUsed
encount=(encount*3/2)
end
if $Trainer.party.length>0 && !$Trainer.party[0].egg?
if isConst?($Trainer.party[0].item,PBItems,:CLEANSETAG)
encount=(encount*2/3)
elsif isConst?($Trainer.party[0].item,PBItems,:PUREINCENSE)
encount=(encount*2/3)
end
if isConst?($Trainer.party[0].ability,PBAbilities,:STENCH)
encount=(encount/2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:WHITESMOKE)
encount=(encount/2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:QUICKFEET)
encount=(encount/2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:SNOWCLOAK) &&
$game_screen.weather_type==3
encount=(encount/2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:SANDVEIL) &&
$game_screen.weather_type==4
encount=(encount/2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:SWARM)
encount=(encount*3/2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:ILLUMINATE)
encount=(encount*2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:ARENATRAP)
encount=(encount*2)
elsif isConst?($Trainer.party[0].ability,PBAbilities,:NOGUARD)
encount=(encount*2)
end
end
return nil if rand(2874)>=encount
encpoke=pbEncounteredPokemon(enctype)
if $Trainer.party.length>0 && !$Trainer.party[0].egg?
if encpoke && isConst?($Trainer.party[0].ability,PBAbilities,:INTIMIDATE) &&
encpoke[1]<=$Trainer.party[0].level-5 && rand(2)==0
encpoke=nil
end
if encpoke && isConst?($Trainer.party[0].ability,PBAbilities,:KEENEYE) &&
encpoke[1]<=$Trainer.party[0].level-5 && rand(2)==0
encpoke=nil
end
end
return encpoke
end
end

 

-Il secondo problema, meno importante del primo, riguarda il legare un animazione ad un evento script...Mi spiego meglio.

Nel mio gioco vi saranno presenti le Megaevoluzioni il problema è che esse, per la trasformazione, non ha alcuna animazione...Quello che vorrei fare è aggiungere un animazione nel passaggio di mutazione in modo da rendere il tutto più gradevole alla vista. Mi sapreste aiutare in merito?

 

Vi ringrazio in anticipo!!!!!!!!!!!!!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

In che senso non c'è "l'erba"? Cosa devi fare esattamente? Se devi aggiungere dei Pokémon nell'erba, basta che li inserisci nell'editor nella voce Set Encounters. E quei pokémon appariranno automaticamente nell'erba...

CLICCA SUL BANNER QUI SOTTO PER ENTRARE ANCHE TU NEL GRUPPO VOCALE DISCORD!

>>> BIM_Banner2.png <<<

 

Le mie guide:

 

 

I miei plugin:

 

 

Roba:

 

 

http://i.imgur.com/dWUeHeL.jpg

 

http://37.media.tumblr.com/c5e5c7ccc70b4e7119ad585c98b4eafc/tumblr_n5munym41a1rlwn4io6_r1_250.gif http://67.media.tumblr.com/87ed7c36599b5438e6da0a0d94d99f80/tumblr_mr5fkbv9gO1qkufl8o1_500.gif

http://i.imgur.com/osqupoP.png

xyknPmC.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...