- 89
- Posts
- 16
- Years
- Seen Apr 5, 2016
The past 2 days I have been attempting to implement 3 new types of encounters using the method described in the wiki. They are WaterMorning, WaterDay, and WaterNight, and I am near positive I have followed the instructions properly, but the external editor does not show them no matter what I do. I remember having the same problem when poccil was the one making the kit so is this something I am doing wrong or is this normal for the kit?
Defining them:
Compiler
So that it cant be used on a cave map
Enabling it:
Encounter Method
Allowing the Editor to Use the method:
Again so it cant be used on a cave map
and for its density
With all of it like that I still get this
I've Probably done something wrong in all of this, but I'm terrible with scripting so I have no idea what it is so I could really use some help here.
Edit: here is the tutorial I was following https://pokemonessentials.wikia.com/wiki/Adding_new_encounter_methods
Defining them:
Code:
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
WaterMorning = 13
WaterDay = 14
WaterNight = 15
Names=[
"Land",
"Cave",
"Water",
"RockSmash",
"OldRod",
"GoodRod",
"SuperRod",
"HeadbuttLow",
"HeadbuttHigh",
"LandMorning",
"LandDay",
"LandNight",
"BugContest",
"WaterMorning",
"WaterDay",
"WaterNight"
]
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],
[60,30,5,4,1],
[60,30,5,4,1],
[60,30,5,4,1]
]
Code:
lastmapid=mapid
if thisenc && (thisenc[1][EncounterTypes::Land] ||
thisenc[1][EncounterTypes::LandMorning] ||
thisenc[1][EncounterTypes::LandDay] ||
thisenc[1][EncounterTypes::BugContest] ||
thisenc[1][EncounterTypes::LandNight]
thisenc[1][EncounterTypes::WaterMorning] ||
thisenc[1][EncounterTypes::WaterDay] ||
thisenc[1][EncounterTypes::WaterNight] ||) &&
thisenc[1][EncounterTypes::Cave]
raise _INTL("Can't define both Land and Cave encounters in the same area (map ID {1})",mapid)
end
thisenc=[[25,10,10,0,0,0,0,0,0,25,25,25,25,10,10,10],[]]
encounters[mapid.to_i]=thisenc
needdensity=true
i+=1
next
end
enclines=[12,12,5,5,2,3,5,8,8,12,12,12,12,5,5,5]
Code:
elsif needdensity
needdensity=false
nums=strsplit(line,/,/)
if nums && nums.length>=3
thisenc[0][EncounterTypes::Land]=nums[0].to_i
thisenc[0][EncounterTypes::LandMorning]=nums[0].to_i
thisenc[0][EncounterTypes::LandDay]=nums[0].to_i
thisenc[0][EncounterTypes::LandNight]=nums[0].to_i
thisenc[0][EncounterTypes::BugContest]=nums[0].to_i
thisenc[0][EncounterTypes::Cave]=nums[1].to_i
thisenc[0][EncounterTypes::Water]=nums[2].to_i
thisenc[0][EncounterTypes::WaterMorning]=nums[2].to_i
thisenc[0][EncounterTypes::WaterDay]=nums[2].to_i
thisenc[0][EncounterTypes::WaterNight]=nums[2].to_i
Code:
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] ||
@enctypes[EncounterTypes::WaterMorning] ||
@enctypes[EncounterTypes::WaterDay] ||
@enctypes[EncounterTypes::WaterNight]) ? true : false
end
Code:
def pbEncounterType
if $PokemonGlobal && $PokemonGlobal.surfing
time=pbGetTimeNow
enctype=EncounterTypes::Water
enctype=EncounterTypes::WaterNight if self.hasEncounter?(EncounterTypes::WaterNight) && PBDayNight.isNight?(time)
enctype=EncounterTypes::WaterDay if self.hasEncounter?(EncounterTypes::WaterDay) && PBDayNight.isDay?(time)
enctype=EncounterTypes::WaterMorning if self.hasEncounter?(EncounterTypes::WaterMorning) && PBDayNight.isMorning?(time)
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)
Again so it cant be used on a cave map
Code:
elsif i==1
dogen=true unless enc[1][EncounterTypes::Land] ||
enc[1][EncounterTypes::LandMorning] ||
enc[1][EncounterTypes::LandDay] ||
enc[1][EncounterTypes::LandNight] ||
enc[1][EncounterTypes::BugContest] ||
enc[1][EncounterTypes::WaterMorning] ||
enc[1][EncounterTypes::WaterDay] ||
enc[1][EncounterTypes::WaterNight]
Code:
enc[0][EncounterTypes::LandMorning]=enc[0][EncounterTypes::Land]
enc[0][EncounterTypes::LandDay]=enc[0][EncounterTypes::Land]
enc[0][EncounterTypes::LandNight]=enc[0][EncounterTypes::Land]
enc[0][EncounterTypes::BugContest]=enc[0][EncounterTypes::Land]
enc[0][EncounterTypes::WaterMorning]=enc[0][EncounterTypes::Water]
enc[0][EncounterTypes::WaterDay]=enc[0][EncounterTypes::Water]
enc[0][EncounterTypes::WaterNight]=enc[0][EncounterTypes::Water]
![[PokeCommunity.com] external editor and new encounter types [PokeCommunity.com] external editor and new encounter types](https://i45.tinypic.com/em5q0.png)
I've Probably done something wrong in all of this, but I'm terrible with scripting so I have no idea what it is so I could really use some help here.
Edit: here is the tutorial I was following https://pokemonessentials.wikia.com/wiki/Adding_new_encounter_methods