Xeen's cronicles

Are you looking for fun Custom Dungeons that you could play or do you want to share your mod with others? Then this forum is for you!
Post Reply
Badgert
Posts: 258
Joined: Sun Jan 29, 2017 6:14 pm

Xeen's cronicles

Post by Badgert »

Xeen's cronicles (volume 1)

Ominous thunderstorms are gathering over Xeen again.The Head of the Dragon Circle, Savergos, is calling all brave and resolute inhabitants of the planet for help.
A hero is needed to restore the destroyed portal to the Dark Side (or to find another one), to follow through it and solve the problem once and forever.
Will you sit back behind the walls of a tavern or will you follow his call?

It's an adventure in an open world for the beginning level party (it's strongly desireable to have a mage in your group).
A lot of new territories, castles and dungeons are available. Deadly enemies and traps are waiting.
Puzzles and conundrums (most of them are not very difficult), great amount of secret places and mysteries.
Renewed system of spells. Several new spells.
There's a possibility to communicate with the key NPCs and a trade system.

For stable operation of the mod, you must install 4GBpatch

68 new locations
130+ hidden hiding places and treasures
24 boss battles

Badgert
v 1.1

https://www.nexusmods.com/legendofgrimrock2/mods/116

I will be glad to see your advice and comments.
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Xeen's cronicles

Post by Zo Kath Ra »

https://imgur.com/H9SWYvu

What's up with dialogue option 1 ?
Did you forget to translate the text from Russian (?)
Badgert
Posts: 258
Joined: Sun Jan 29, 2017 6:14 pm

Re: Xeen's cronicles

Post by Badgert »

I'm sorry. There should be a string - "Maybe we'll be able to restore it."
My fault - hurried ...
RacerX
Posts: 134
Joined: Fri Aug 11, 2017 7:03 pm

Re: Xeen's cronicles

Post by RacerX »

Great, look forward to explore...
Banaora
Posts: 162
Joined: Wed Jun 05, 2013 9:39 am

Re: Xeen's cronicles

Post by Banaora »

Hi Badgert,

I'm having a look at your mod and so far I am enjoying my journey.

One thing I didn't like was that my mage can't use the spells when he carries the spell scrolls around in a container instead of having them directly on his body.

Btw I just cleared the cemetery so you know how far in I am.

Cheers,
Banaora
User avatar
Torst
Posts: 128
Joined: Tue Mar 06, 2012 12:41 pm
Location: Germany

Re: Xeen's cronicles

Post by Torst »

I've made a mistake
SpoilerShow
with the barn key.Found him but use him before i get the quest in the tavern
Badgert
Posts: 258
Joined: Sun Jan 29, 2017 6:14 pm

Re: Xeen's cronicles

Post by Badgert »

I have already been informed about the problem with the scrolls. Alas, I do not know how to technically make the ability to use scrolls from bags and boxes.
Thanks for the feedback. Hope you like new adventures!

to Torst
No mistake, the keys can be used at any time.
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Xeen's cronicles

Post by Zo Kath Ra »

Badgert wrote: Thu Jan 17, 2019 9:54 am I have already been informed about the problem with the scrolls. Alas, I do not know how to technically make the ability to use scrolls from bags and boxes.
init.lua

Code: Select all

defineObject{
    name = "party",
    baseObject = "party",
    components = {
        {
            class = "Party",
            onCastSpell = function(self, champion, spell)
                -- only cast "spell" if the champion has a "scroll_spell" in their inventory (search recursively through containers)
                for i = 1, ItemSlot.MaxSlots do
                    local item = champion:getItem(i)
                    
                    if item then
                        -- item is the correct spell scroll
                        if item.go.name == "scroll_" .. spell then
                            return true
                        end
                        
                        -- item is a container
                        if item.go.containeritem and script_entity_1.script.containsItem(item, "scroll_" .. spell) then
                            return true
                        end
                    end
                end
                
                hudPrint(champion:getName() .. " needs to have the spell scroll on him to be able to cast it")
                return false
            end
        }
    }
}
script_entity_1

Code: Select all

function containsItem(container, name)
	local containerItem = container.go.containeritem
	
	for i = 1, containerItem:getCapacity() do
		local item = containerItem:getItem(i)
		
		if item then
			-- item is of type "name"
			if item.go.name == name then
				return true
			end
			
			-- item is a container
			if item.go.containeritem and containsItem(item, name) then
				return true
			end
		end
	end
	
	return false
end
In Xeen's Chronicles, you have to put onCastSpell() in mod_assets/zim_assets/zim_party.lua instead of init.lua

zim_party.lua currently has two definitions for onCastSpell()
No idea if both are called or if the second replaces the first one.
Banaora
Posts: 162
Joined: Wed Jun 05, 2013 9:39 am

Re: Xeen's cronicles

Post by Banaora »

Hey Zo Kath Ra,

in script_entity_1 wouldn't you have to use ContainerItemComponent:getCapacity() instead of getItemCount()?

My thinking is that getItemCount() only works reliably if you always organize your bags from the top down.

I don't know for sure so it's a real question and not a rhetorical one.

Anyway, good work with the scripts.

Cheers,
BanaOra
Last edited by Banaora on Thu Jan 17, 2019 5:45 pm, edited 1 time in total.
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Xeen's cronicles

Post by Zo Kath Ra »

Banaora wrote: Thu Jan 17, 2019 4:25 pm Hey Zo Kath Ra,

in script_entity_1 wouldn't you have to use ContainerItemComponent:getCapacity() instead of getItemCount()?

My thinking is that getItemCount() only works reliably if you always organize your bags from the top down.

I don't know for sure so it's a real question and not a rethorical one.

Anyway, good work with the scripts.

Cheers,
BanaOra
You're absolutely right, thanks for the heads-up.
I've changed it and now the code should work perfectly :)
Post Reply