Dear visitor, welcome to RPG Studio - Make your World real. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Bananni

Gesperrter Nutzer

  • "Bananni" has been banned
  • "Bananni" started this thread

Motto: Belive the hype!

  • Send private message

1

Tuesday, June 8th 2010, 9:56pm

Fonts

Hi,
also ich würde gerne andere fonts als diese standart teile benutzten.
Ich bastel mir also eine Font datei.
Diese würde ich aber gerne aus meinen datein laden und ned aus den Fonts ordner des OS.
is das irgendwie möglich?
Oder muss ich meine Font datei beim installieren in den Fonts ordner des OS kopieren lassen?
Allternativ könnte ich ja bilder als fonts nehmen, aber das is langsamer oder?
Bild
My Deviantart : )
Spoiler

StepSound Script:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#==================================
# Step Sound Script
#---------------------------------------------------
# @Autor Bananni
# @Date 07/08/2010
#==================================
class Game_Player
  # CONFIGS
  STEP_SOUND_VOLUME = 100
  STEP_SOUND_PITCH = 100
  STEP_SOUND_ARRAY=[
                    ["",0], # TERRAIN ID = 0
                    ["test.wav",10], # TERRAIN ID = 1
                    ["",0], # TERRAIN ID = 2
                    ["",0], # TERRAIN ID = 3
                    ["",0], # TERRAIN ID = 4
                    ["",0], # TERRAIN ID = 5
                    ["",0], # TERRAIN ID = 6
                    ["",0], # TERRAIN ID = 7
                    ["",0], # TERRAIN ID = 8
                    ["",0]  # TERRAIN ID = 9
                   ]
  # ENDE CONFIGS
  alias :increase_steps_banannis_shit :increase_steps
  alias :update_banannis_shit :update
  def increase_steps
    increase_steps_banannis_shit
    if @step_countdown == 0
      id = $game_map.terrain_tag(x, y)
      if STEP_SOUND_ARRAY[id][0] != ""
        Audio.se_play("Audio/SE/" + STEP_SOUND_ARRAY[id][0], STEP_SOUND_VOLUME, STEP_SOUND_PITCH)
        @step_countdown=STEP_SOUND_ARRAY[id][1]
      end
    end
  end
  def update
    update_banannis_shit
    if @step_countdown == nil
      @step_countdown=0
    end
    if @step_countdown != 0
      @step_countdown-=1
    end
  end
end


Map Roots

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#==================================
# Map Names & Map Root
#---------------------------------------------------
# @Autor Bananni
# @Date 07/08/2010
#---------------------------------------------------
# Get Map Name:
#   $game_system.map_names[any_map_id]
# Get Map Root ID:
#   $game_system.parent_map(any_map_id)
#==================================
class Game_System
  attr_reader :map_names
  alias :wtf_bananni_alias_this_game_system_init :initialize
  def initialize
    wtf_bananni_alias_this_game_system_init
    read_map_names
  end
  def parent_map id=$game_map.map_id
    while true
      par=@map_parent[id]
      break if par == 0
      id=par
    end
    return @map_names[id]
  end
  def read_map_names
    map_infos = load_data("Data/MapInfos.rxdata")
    @map_names = Array.new
    @map_parent = Array.new
    for key in map_infos.keys
      @map_names[key] = map_infos[key].name
      @map_parent[key] = map_infos[key].parent_id
    end
  end
end

highlight to read

2

Tuesday, June 8th 2010, 11:34pm

Schau dir mal Font.createFont an. Das nimmt auch einen File oder InputStream entgegen.
Bild
RMXP Grundkurs
1 2 3
Ruby/RGSS-Kurs

3

Wednesday, June 9th 2010, 10:14am

Hallo,
wenn du sie schön in deine Packagestruktur einfügst, ist es kein Ding. Ich empfehle ttf Font sollte jede Java VM lesen können.

zB:
[java]public static Font getFont(String name) {
Font font = null;
try {
InputStream is = DemoFonts.class.getResourceAsStream(name);
font = Font.createFont(Font.TRUETYPE_FONT, is);
} catch (Exception ex) {
ex.printStackTrace();
System.err.println(name + " not loaded. Using serif font.");
font = new Font("serif", Font.PLAIN, 24);
}
return font;
}[/java]

dann musste bloß deinen Komponenten noch die font geben ;)

Grüße Steve
:information: YAams
:rainbow: Random Signatur
Bild





Weitere Informationen | Download
Mit Support für RGSS Project 1!
Bild

Bananni

Gesperrter Nutzer

  • "Bananni" has been banned
  • "Bananni" started this thread

Motto: Belive the hype!

  • Send private message

4

Wednesday, June 9th 2010, 1:43pm

hört sich gut an, ty
... das ich sowas immer überseh >_>
Bild
My Deviantart : )
Spoiler

StepSound Script:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#==================================
# Step Sound Script
#---------------------------------------------------
# @Autor Bananni
# @Date 07/08/2010
#==================================
class Game_Player
  # CONFIGS
  STEP_SOUND_VOLUME = 100
  STEP_SOUND_PITCH = 100
  STEP_SOUND_ARRAY=[
                    ["",0], # TERRAIN ID = 0
                    ["test.wav",10], # TERRAIN ID = 1
                    ["",0], # TERRAIN ID = 2
                    ["",0], # TERRAIN ID = 3
                    ["",0], # TERRAIN ID = 4
                    ["",0], # TERRAIN ID = 5
                    ["",0], # TERRAIN ID = 6
                    ["",0], # TERRAIN ID = 7
                    ["",0], # TERRAIN ID = 8
                    ["",0]  # TERRAIN ID = 9
                   ]
  # ENDE CONFIGS
  alias :increase_steps_banannis_shit :increase_steps
  alias :update_banannis_shit :update
  def increase_steps
    increase_steps_banannis_shit
    if @step_countdown == 0
      id = $game_map.terrain_tag(x, y)
      if STEP_SOUND_ARRAY[id][0] != ""
        Audio.se_play("Audio/SE/" + STEP_SOUND_ARRAY[id][0], STEP_SOUND_VOLUME, STEP_SOUND_PITCH)
        @step_countdown=STEP_SOUND_ARRAY[id][1]
      end
    end
  end
  def update
    update_banannis_shit
    if @step_countdown == nil
      @step_countdown=0
    end
    if @step_countdown != 0
      @step_countdown-=1
    end
  end
end


Map Roots

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#==================================
# Map Names & Map Root
#---------------------------------------------------
# @Autor Bananni
# @Date 07/08/2010
#---------------------------------------------------
# Get Map Name:
#   $game_system.map_names[any_map_id]
# Get Map Root ID:
#   $game_system.parent_map(any_map_id)
#==================================
class Game_System
  attr_reader :map_names
  alias :wtf_bananni_alias_this_game_system_init :initialize
  def initialize
    wtf_bananni_alias_this_game_system_init
    read_map_names
  end
  def parent_map id=$game_map.map_id
    while true
      par=@map_parent[id]
      break if par == 0
      id=par
    end
    return @map_names[id]
  end
  def read_map_names
    map_infos = load_data("Data/MapInfos.rxdata")
    @map_names = Array.new
    @map_parent = Array.new
    for key in map_infos.keys
      @map_names[key] = map_infos[key].name
      @map_parent[key] = map_infos[key].parent_id
    end
  end
end

highlight to read

Similar threads

Social bookmarks