1 # GemRB - Infinity Engine Emulator
2 # Copyright (C) 2003 The GemRB Project
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #character generation (GUICG 0)
20 from GUIDefines
import *
28 #(name,script | setFn,commentFn,unsetFn,gaurd)
30 ("gender" , 0 , 11956 ),
31 ("Show name, create player" , None ,CharGenGui
.getName
, CharGenGui
.unsetPlayer
, CharGenGui
.setPlayer
),
32 ("setGender" , "GUICG1" , CharGenGui
.getGender
,CharGenGui
.unsetGender
, None ), #BG2: same
33 ("setPortrait" , "GUICG12" , None ,CharGenGui
.unsetPortrait
, None ), #BG2: different setPicture, PortraitName and extra unused control (TextAreaControl)
35 ("setRace" , "GUICG8" , CharGenGui
.getRace
,CharGenGui
.unsetRace
, None ), #BG2: different resources
36 ("class" , 2 ,11959 ),
37 ("setClass" , "GUICG2" , CharGenGui
.getClass
,CharGenGui
.unsetClass
, None ), #BG2: different resources,other setLogic, has levels/XP
38 ("setMultiClass", "GUICG10" , None ,CharGenGui
.unsetClass
, CharGenGui
.guardMultiClass
), #BG2: not same?
39 ("setSpecialist", "GUICG22" , None ,CharGenGui
.unsetClass
, CharGenGui
.guardSpecialist
), #BG2: not same
40 ("alignment" , 3 ,11958 ),
41 ("setAlignment" , "GUICG3" , CharGenGui
.getAlignment
,CharGenGui
.unsetAlignment
, None ), #bg2: BG1 doesn't take kits into account
42 ("abilities" , 4 ,11960 ),
43 ("setAbilities" , "GUICG4" , CharGenGui
.getAbilities
,CharGenGui
.unsetAbilities
, None ), #bg2: BG2 has extra strength, overpress (functionality + resources), kits
44 ("skill" , 5 ,17372 ),
45 ("divine spells" , None , CharGenGui
.getDivineSpells
,CharGenGui
.unsetDivineSpells
,CharGenGui
.setDivineSpells
),
46 ("hate race" , "GUICG15" , CharGenGui
.getHatedRace
,CharGenGui
.unsetHateRace
, CharGenGui
.guardHateRace
), #BG2: other listsize, button offset, BG2 has TopIndex
47 ("mage spells" , "GUICG7" , CharGenGui
.getMageSpells
,CharGenGui
.unsetMageSpells
, CharGenGui
.guardMageSpells
), #also sets priest in CharGen6, we do it at the end, other animations for buttons
48 ("setSkill" , "GUICG6" , CharGenGui
.getSkills
,CharGenGui
.unsetSkill
, CharGenGui
.guardSkills
),
49 ("proficiencies", "GUICG9" , CharGenGui
.getProfi
,CharGenGui
.unsetProfi
, None ),
50 ("appearance" , 6 ,11961 ),
51 ("colors" , "GUICG13" , None ,CharGenGui
.unsetColors
, None ), #bg2: other cycleids (SetBAM)
52 ("sounds" , "GUICG19" , None ,CharGenGui
.unsetSounds
, None ), #BG2: other: first male sound, logic
54 ("setName" ,"GUICG5" , None ,CharGenGui
.unsetName
, None ), #BG2: same
55 ("accept" , 8 ,11962 ),
56 ("finish" , CharGenGui
.setAccept
, None , None , None )]
58 CharGenCommon
.CharGenMaster
= CharGenCommon
.CharGen(stages
,16575,CharGenGui
.Imprt
)
63 if(CharGenCommon
.CharGenMaster
== None):
65 CharGenCommon
.CharGenMaster
.displayOverview()