Posts: 49 
	Threads: 2 
	Joined: Jun 2011
	
	 
 
	
	
		How to config the shadow in map ,like this >>> |__ to >>> | 
........................................................................................................\ 
 
Can you make this script work with maps larger more than 200 * 200 tiles²
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 27 
	Threads: 0 
	Joined: Jul 2011
	
	 
 
	
	
		Hello MGC. 
i've created the trees :3
 ![[Image: 11014117.png]](http://img268.imageshack.us/img268/1968/11014117.png) 
but now it is very lagging, do you've a antilagscript? 
because i think you're are the only one that can create a antilag for hmode
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 49 
	Threads: 2 
	Joined: Jun 2011
	
	 
 
	
	
		I think because of many events in your map (trees),you can try script anti lag event 
Code: #=============================================================================== 
# ** AntiLag script 
#------------------------------------------------------------------------------- 
# f0tz!baerchen 
# 0.71 
# 06.01.2007 
#------------------------------------------------------------------------------- 
# Credits: 
# Chaosg1 (for testing ;) ) 
# NearFantastica (for the Event AntiLag I used and improved) 
#------------------------------------------------------------------------------- 
# Features: 
# - Event AntiLag: Event (and their Sprites) which are not on the screen are 
# not updated except they run on "Autostart" or "Parallel Process" or they 
# have an empty comment in the first line 
# - High Priority: Game can be run on high priority 
# - Smooth Antilag: the Event AntiLag does only work fine if the events are 
# distributed over the whole map, but when there are many events at the same 
# place it lags again. If the script notices that the CPU utilization 
# gets higher than $antilag.max_cpu_utilization it will slow down the game and 
# reduce the framerate as long as needed. 
#------------------------------------------------------------------------------- 
# Settings: 
# can be changed anytime during the game. They are found at the end of the 
# script. 
#=============================================================================== 
#=============================================================================== 
# Class for Antilag Settings 
#=============================================================================== 
class Antilag_Settings 
  
attr_accessor :event 
attr_accessor :max_cpu_utilization 
attr_accessor :cpu_tolerance 
#----------------------------------------------------------------------------- 
# initializes default settings 
#----------------------------------------------------------------------------- 
def initialize 
@event = true 
@high_priority = true 
@max_cpu_utilization = 100 
@cpu_tolerance = 20 
@SetPriorityClass = Win32API.new('kernel32', 'SetPriorityClass', 
['p', 'i'], 'i') 
@GetProcessTimes = Win32API.new('kernel32', 'GetProcessTimes', 
['i','p','p','p','p'], 'i') 
end 
#----------------------------------------------------------------------------- 
# turns high priority on/off 
#----------------------------------------------------------------------------- 
def high_priority=(value) 
@high_priority = value 
  
if @high_priority 
@SetPriorityClass.call(-1, 0x00000080) # High Priority 
else 
@SetPriorityClass.call(-1, 0x00000020) # Normal Priority 
end 
end 
#----------------------------------------------------------------------------- 
# returns the current CPU Utilization 
#----------------------------------------------------------------------------- 
def get_cpu_utilization 
# uses API Call to get the Kernel and User Time 
creation_time = '0' * 10 
exit_time = '0' * 10 
kernel_time = '0' * 10 
user_time = '0' * 10 
@GetProcessTimes.call(-1, creation_time, exit_time, kernel_time, user_time) 
# converts times into integer (in 100ns) 
kernel_time = kernel_time.unpack('l2') 
user_time = user_time.unpack('l2') 
kernel_time = kernel_time[0] + kernel_time[1] 
user_time = user_time[0] + user_time[1] 
# takes differences to calculate cpu utilization 
if @old_time != nil 
timer_difference = Time.new - @old_timer 
time_difference = kernel_time + user_time - @old_time 
result = time_difference / timer_difference / 100000 
else 
result = $antilag.max_cpu_utilization 
end 
# saves values (to calculate the differences, sa) 
@old_timer = Time.new 
@old_time = kernel_time + user_time 
return result 
end 
end 
$antilag = Antilag_Settings.new 
#=============================================================================== 
# Scene_Map class 
#=============================================================================== 
class Scene_Map 
#----------------------------------------------------------------------------- 
# update method, smooth antilag has been added 
#----------------------------------------------------------------------------- 
alias f0tzis_anti_lag_scene_map_update update 
def update 
f0tzis_anti_lag_scene_map_update 
if Graphics.frame_count % 20 == 0 and $antilag.max_cpu_utilization <= 100 
# calculates difference between max utilization and current utilization 
abs = $antilag.max_cpu_utilization - $antilag.get_cpu_utilization 
# changes Frame Rate if difference is bigger than the tolerance 
if abs.abs >= $antilag.max_cpu_utilization * $antilag.cpu_tolerance/100.0 
Graphics.frame_rate = [[10, Graphics.frame_rate + abs / 2].max, 40].min 
end 
end 
end 
end 
#============================================================================== 
# Game_Event Class 
#=============================================================================== 
class Game_Event 
#----------------------------------------------------------------------------- 
# for AntiLag, decides, if an event is on the screen or not. 
#----------------------------------------------------------------------------- 
def in_range? 
  
# returns true if $event_antilag is false or the event is an 
# Autostart/Parallel Process event or it has an empty 
# comment in the first line 
if not $antilag.event or (@trigger == 3 or @trigger == 4 or 
(@list != nil and @list[0].code == 108 and @list[0].parameters == [''])) 
return true 
end 
  
screne_x = $game_map.display_x 
screne_x -= 256 
screne_y = $game_map.display_y 
screne_y -= 256 
screne_width = $game_map.display_x 
screne_width += 2816 
screne_height = $game_map.display_y 
screne_height += 2176 
  
return false if @real_x <= screne_x 
return false if @real_x >= screne_width 
return false if @real_y <= screne_y 
return false if @real_y >= screne_height 
return true 
  
end 
#----------------------------------------------------------------------------- 
# update method 
#----------------------------------------------------------------------------- 
alias f0tzis_anti_lag_game_event_update update 
def update 
return if not self.in_range? 
f0tzis_anti_lag_game_event_update 
end 
  
end 
#=============================================================================== 
# Sprite_Character Class 
#=============================================================================== 
class Sprite_Character < RPG::Sprite 
#----------------------------------------------------------------------------- 
# update method, parameters added for Loop_Map, rebuild for 8dirs 
#----------------------------------------------------------------------------- 
alias f0tzis_anti_lag_sprite_char_update update 
def update 
return if @character.is_a?(Game_Event) and not @character.in_range? 
f0tzis_anti_lag_sprite_char_update 
end 
  
end 
#=============================================================================== 
# Settings 
#=============================================================================== 
$antilag.max_cpu_utilization = 70 # the maximum CPU utilization, the script 
# try to stay under this value during changing 
# changing the frame rate. The lower this 
# value the higher will be the lag reduction 
# (and the smoothness, too), a value > 100 
# will disable this feature completely 
$antilag.cpu_tolerance = 20 # this value tells the script how many % of 
# the CPU utilization change should be ignored 
# If you change it too a higher value you, 
# your Frame Rate will be more constant but 
# smaller lags will be ignored. 
$antilag.high_priority = true # set this to true if you want the game to run 
# on high priority 
$antilag.event = true # set this to true to enable normal anti-lag 
#=============================================================================== 
# Interpreter Class 
#=============================================================================== 
class Interpreter 
#----------------------------------------------------------------------------- 
# * script 
#----------------------------------------------------------------------------- 
def command_355 
# Set first line to script 
script = @list[@index].parameters[0] + "\n" 
# Loop 
loop do 
# If next event command is second line of script or after 
if @list[@index+1].code == 655 
# Add second line or after to script 
script += @list[@index+1].parameters[0] + "\n" 
# If event command is not second line or after 
else 
# Abort loop 
break 
end 
# Advance index 
@index += 1 
end 
# Evaluation 
result = eval(script) 
#--------------------------------------------------------------------------- 
# If return value is false 
# NEW: the last word of the code mustnt be false! 
#--------------------------------------------------------------------------- 
if result == false and script[script.length-6..script.length-2] != 'false' 
# End 
return false 
end 
# Continue 
return true 
end 
end
  
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 17 
	Threads: 2 
	Joined: Sep 2011
	
	 
 
	
	
		I absolutely love this script. It is the most advanced by far of any I've ever seen for RMXP. 
You said in an earlier post that you were able to make more than just the 3 layers. I have a request; 
 
Could you please post the DLL you used with that? I created a special editor that can merge maps, edit tiles, events and add additional layers to the map. I would be able to do this myself, as I've already scripted a collision system for the H Mode, but I don't have the source code for the DLL, which processes everything in the creation of the map. 
 
If possible, could you post the DLL, either in the editable format, or with the change of reading every layer of the map, not just limited to the first 3 layers, but however many layers there would be . It would be most appreciated
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 27 
	Threads: 0 
	Joined: Jul 2011
	
	 
 
	
	
		 (09-23-2011, 10:37 PM)Chaotech Games Wrote:  I absolutely love this script. It is the most advanced by far of any I've ever seen for RMXP. 
You said in an earlier post that you were able to make more than just the 3 layers. I have a request; 
 
Could you please post the DLL you used with that? I created a special editor that can merge maps, edit tiles, events and add additional layers to the map. I would be able to do this myself, as I've already scripted a collision system for the H Mode, but I don't have the source code for the DLL, which processes everything in the creation of the map. 
 
If possible, could you post the DLL, either in the editable format, or with the change of reading every layer of the map, not just limited to the first 3 layers, but however many layers there would be . It would be most appreciated are you a scripter?
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 17 
	Threads: 2 
	Joined: Sep 2011
	
	 
 
	
	
		Yes, I am a scripter. Using this, I have made a working collision system based on the altitude of the different sections, optimized for pixel movement, and added a semi-complete Blizz-ABS support (sorry, even though they are for a non-profit, free to play game, they are very specialized, and probably will not be released.) I really need the DLL to support more layers than just the three, or some way to edit it. MGC posted earlier that he tested his with the dimmensions doubled, and said it was probably possible to have it up to 8 layers. Using an alternative RGSS editor I derrived (using RGSS itself) I could add additional layers and merge maps. In a test I tried to use 6 layers, H-Mode7 refused to draw the additional layers. I have completely read the script, but nothing that could be edited there would affect either how high each layer's drawn height was at maximum, or anything that would limit the number of layers read. 
 
What I need in the DLL is for it to read layers 0 to whatever, but not if they don't exist. 
Ex: If it's a basic, unedited normal map, it would read up to layer 3, but if layer 4 exists, it also draws that, as well as 5, 6, 7, and so on if they exist.  
Perferably, this to be unlimited, as I do not expect that I will use more than, say, 20 layers, but it's always better to be safe than sorry. 
I am not worried about memory size, or lag, as there are quite a few other things that I can do to cut this down. 
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 27 
	Threads: 0 
	Joined: Jul 2011
	
	 
 
	
	
		 (09-24-2011, 05:59 PM)Chaotech Games Wrote:  Yes, I am a scripter. Using this, I have made a working collision system based on the altitude of the different sections, optimized for pixel movement, and added a semi-complete Blizz-ABS support (sorry, even though they are for a non-profit, free to play game, they are very specialized, and probably will not be released.) I really need the DLL to support more layers than just the three, or some way to edit it. MGC posted earlier that he tested his with the dimmensions doubled, and said it was probably possible to have it up to 8 layers. Using an alternative RGSS editor I derrived (using RGSS itself) I could add additional layers and merge maps. In a test I tried to use 6 layers, H-Mode7 refused to draw the additional layers. I have completely read the script, but nothing that could be edited there would affect either how high each layer's drawn height was at maximum, or anything that would limit the number of layers read. 
 
What I need in the DLL is for it to read layers 0 to whatever, but not if they don't exist. 
Ex: If it's a basic, unedited normal map, it would read up to layer 3, but if layer 4 exists, it also draws that, as well as 5, 6, 7, and so on if they exist.  
Perferably, this to be unlimited, as I do not expect that I will use more than, say, 20 layers, but it's always better to be safe than sorry. 
I am not worried about memory size, or lag, as there are quite a few other things that I can do to cut this down. 
I don't think MGC is replying because the last time, he isnt replying to things 
in this topic
 
Do you like it to help me and my game? 
we're using hmode XD 
Because it is realy bad quality and realy lagging, I've a scripter, but he cant make/fix/edit hard scripts 
Here is my DA account:
 http://renekokkie.deviantart.com/
here are some screens, but if you want i can give my MSN, and give alot of information
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 17 
	Threads: 2 
	Joined: Sep 2011
	
	 
 
	
	
		No, I have the DLL. I would like MGC to post an edited one with what I requested. 
The current DLL doesn't support what I need it to. 
 
Reneokkie, I've sent you a PM on Deviantart.  
 
Edit: 
Also, something I forgot before, MGC, could you possibly make it so that Alpha (transparency) values are drawn for the map, not just the RGB, but only if the value is greater than 0? This would be most helpful for making things like windows, and Ice, as well as using a miniscule value like 1 to make things like trees using more than one layer would have a space in the middle-ish. 
 
Sorry for all of the requests. I'd do them myself if I could.
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 14 
	Threads: 0 
	Joined: May 2011
	
	 
 
	
	
		Hello. Chaotech Games 
 
Amazing, I expect your work.  
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 151 
	Threads: 13 
	Joined: Jun 2009
	
	 
 
	
	
		Sorry for the lack of activity, I didn't find much time to deal with RM lately. 
Here's the v.1.3 : some features are added, but not all that I had in mind (the rest will be included in a future version). 
What's new : 
- "wall" events 
- animated vertical textures 
- lower resolutions handling 
 
And some minor things : 
- included the [OV] feature 
- fixed a bug with several transluscent events 
- included pivot manipulation 
 
See the first post for more details. 
 
At all and especially Chaotech Games > I took note of your requests.
	 
	
	
	
	
 
 
	 
 |