Stop import characters

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
ian363
Posts: 55
Joined: Tue Dec 18, 2012 3:44 pm

Stop import characters

Post by ian363 »

Is there a way to remove the import characters on custom dungeons. My games is designed for new characters, powerful ones would make it too easy. Thanks Ian.
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Stop import characters

Post by Eleven Warrior »

yeah mate there is. This is one way.

Code: Select all

function remove1()
for i = 1,4 do
local c = party.party:getChampion(i)
local class = c:getClass()
if class == “rogue” then
party.party:getChampion(i):setEnabled(false)
end
end
Second way is to make champ(s) start as you want them to be eg: (this is all 4 champs mate) I hope this helps you bro:) If not call us.

Code: Select all

local c = party.party:getChampion(1)
--Champ 1
c:setName('Tifa Lockhart')
c:setClass('fighter')
c:setRace('ratling')
c:setSex('female') 

--c:insertItem(1,spawn("dagger").item)
c:insertItem(3,spawn("peasant_cap").item)
c:insertItem(4,spawn("peasant_tunic").item)
c:insertItem(5,spawn("peasant_breeches").item)
c:insertItem(6,spawn("sandals").item)
 
c:gainExp(10)
c:setPortrait('assets/textures/portraits/ratling_female_03.tga')
--c:trainSkill('light_weapons',1)

c:setBaseStat('strength',16) --**


local c = party.party:getChampion(2)
--Champ 2
c:setName('Fiddler Thain')
c:setClass('rogue')
c:setRace('ratling')
c:setSex('male')

c:insertItem(3,spawn("peasant_cap").item)
c:insertItem(4,spawn("peasant_tunic").item)
c:insertItem(5,spawn("peasant_breeches").item)
c:insertItem(6,spawn("sandals").item)

c:gainExp(10)
c:setPortrait('assets/textures/portraits/ratling_male_04.tga')
c:trainSkill('missile_weapons',1)
c:trainSkill('throwing',1)

c:setBaseStat('strength',12)


local c = party.party:getChampion(3)
--Champ 3
c:setName('Thourun Wisthoff')
c:setClass('wizard')
c:setRace('ratling')
c:setSex('male')

c:insertItem(3,spawn("peasant_cap").item)
c:insertItem(4,spawn("peasant_tunic").item)
c:insertItem(5,spawn("peasant_breeches").item)
c:insertItem(6,spawn("sandals").item)

c:gainExp(10)
c:setPortrait('assets/textures/portraits/ratling_male_06.tga')
c:trainSkill('fire_magic',1)
c:trainSkill('earth_magic',1)
c:trainSkill('firearms',-1)
c:setSkillPoints(-1) 
c:setBaseStat('strength',8)


local c = party.party:getChampion(4)
--Champ 4
c:setName('Zala Lockhart')
c:setClass('alchemist')
c:setRace('ratling')
c:setSex('female')

c:insertItem(3,spawn("peasant_cap").item)
c:insertItem(4,spawn("peasant_tunic").item)
c:insertItem(5,spawn("peasant_breeches").item)
c:insertItem(6,spawn("sandals").item)

c:gainExp(10)
c:setPortrait('assets/textures/portraits/ratling_female_04.tga')
c:trainSkill('alchemy',1)
c:trainSkill('firearms',1)

c:setBaseStat('strength',8)
ian363
Posts: 55
Joined: Tue Dec 18, 2012 3:44 pm

Re: Stop import characters

Post by ian363 »

Thanks for your reply but I think your code is to alter characters after you enter game. I want to remove the option to import characters at the start screen when choosing a custom game. Thanks Ian
trancelistic
Posts: 275
Joined: Sat Jun 16, 2012 5:32 am

Re: Stop import characters

Post by trancelistic »

Just place it on the map/world ( I think it has to be 1 second delay, so connect it to a timer with 1 sec delay, and timer to itself to deactivate.

put hidden presure plate or so where ur party starts so the timer will run and put all champs level 1.
minmay
Posts: 2789
Joined: Mon Sep 23, 2013 2:24 am

Re: Stop import characters

Post by minmay »

you can't remove the option, you can only modify the champions once the dungeon starts
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
ian363
Posts: 55
Joined: Tue Dec 18, 2012 3:44 pm

Re: Stop import characters

Post by ian363 »

minmay wrote:you can't remove the option, you can only modify the champions once the dungeon starts
OK thanks everyone.
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Stop import characters

Post by Isaac »

ian363 wrote:
minmay wrote:you can't remove the option, you can only modify the champions once the dungeon starts
OK thanks everyone.
You should probably [highly recommended] place an all caps warning ~or at least a polite note in the description, mentioning that you plan to wipe the default characters when the game starts; otherwise the player might spend significant time building a party, only to lose them when the adventure begins.
ian363
Posts: 55
Joined: Tue Dec 18, 2012 3:44 pm

Re: Stop import characters

Post by ian363 »

Isaac wrote:
ian363 wrote:
minmay wrote:you can't remove the option, you can only modify the champions once the dungeon starts
OK thanks everyone.
You should probably [highly recommended] place an all caps warning ~or at least a polite note in the description, mentioning that you plan to wipe the default characters when the game starts; otherwise the player might spend significant time building a party, only to lose them when the adventure begins.
Good plan, but I'll just tell people the game is designed for new characters and leave it up to them. I don't want to annoy anyone by down grading their hard won team.
Thanks Ian
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Stop import characters

Post by Komag »

ian363 wrote:I'll just tell people the game is designed for new characters and leave it up to them. I don't want to annoy anyone by down grading their hard won team.
This is the correct answer. Give a recommendation, then let the player choose whether they will follow it.
Finished Dungeons - complete mods to play
Dunkler
Posts: 73
Joined: Thu Jul 10, 2014 3:20 pm

Re: Stop import characters

Post by Dunkler »

What i did in my mod is...create all new classes,races and skills....that way noone can import charakters. If they try well that will end in a crash :P
Post Reply