Ask a simple question, get a simple answer

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!
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Ask a simple question, get a simple answer

Post by Azel »

Well that is unfortunate to hear. So far I only used those assets to create the walkways, hence not too far in to replace them. I am also planning on using Phitt's Asia Tileset, which I assume is good quality due to his reputation.

Hopefully by the time I am ready to publish the final version of my Mod there will be a wooden asset definition that I can use for the Channelwood walkway.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Phitt and Skuggassveinn's sets are fine, yeah.
Duncan1246 wrote:Unfortunately, I have already used these assets in my mod, thinking that they are well converted to LOG2. I have for the moment no solution to replace them by another tile set and it will be a lot of work. Could you precise in what consists the issues: graphic, memory, crash...?
The issues are that everything is wrong. A bunch of static models are missing staticShadow. A bunch of objects that should have occluders don't, or have broken occluders. Objects are missing lots of other needed components (ItemConstrainBoxComponent, etc), and most of the ones that aren't missing have nonsensical fields. The tiles can't build anything useful.
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.
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Ask a simple question, get a simple answer

Post by Azel »

So I think it was from Skugg's link on Nexus Mods that I got the sx_ Assets from:
http://www.nexusmods.com/legendofgrimrock2/mods/29/?

Maybe he just published it for anyone who wants to finish it... and I know i got another sx_ set from another link. Either way, lesson learned here is to look deeper in to these Object Definitions before just plugging them in to a Mod. Glad I read this before I got too far in to using all the definitions.

Although, I helped playtest Drakkan's Mod, Eye of the Atlantis. I'm not 100% certain but I thought his town set was the same sx_ Asset pack. If so, the game played fine, but I'm far from an expert. Could be worth exploring proper resolutions for anyone relying heavily on these assets.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Azel wrote:So I think it was from Skugg's link on Nexus Mods that I got the sx_ Assets from:
http://www.nexusmods.com/legendofgrimrock2/mods/29/?
These are not the assets I am talking about, the broken ones I am referring to are the conversions in this post. The objects included in sx_urban_town folder of The Winter Tileset are fine.
Azel wrote:Although, I helped playtest Drakkan's Mod, Eye of the Atlantis. I'm not 100% certain but I thought his town set was the same sx_ Asset pack. If so, the game played fine, but I'm far from an expert. Could be worth exploring proper resolutions for anyone relying heavily on these assets.
One of the screenshots for that mod shows the bad town tileset conversion, so I hope he cares enough to fix that instead of releasing a broken mod.
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.
User avatar
Duncan1246
Posts: 404
Joined: Mon Jan 19, 2015 7:42 pm

Re: Ask a simple question, get a simple answer

Post by Duncan1246 »

Slade wrote: But that arrange thing is next problem :P Maybe you can change item spawning point or something?
I don't know if it is possible, but if so, I think you have to give each item spawned a precise position, like in the "multialcove Manager" here:viewtopic.php?f=22&t=9306&p=89948&hilit ... ack#p89939.
You can see in this example that objects are precisely placed in armour and weapons rack (if they are in the list pre-defined), but each item position and rotation has to be defined and changed on insert! So if you aren't skilled programmer give up anyway... ;)
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?

Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: Ask a simple question, get a simple answer

Post by AdrTru »

In MultiAlcoveManager is table with definition position and rotation for defined defined group of objects.
Every time on insert is object checked for groups where is presented and connected to "socked" suitible for this group.
But for managing some item in correct position just use something like in code:

Code: Select all

-- function connected to onInsert Hook
function insertItem(Entity,Item)
  Item = Item.go
  Entity = Entity.go or Entity
  local pos,rot = transformSocket(Entity,Item.name,{0,0,0},{0,0,0})
  Item:setWorldPosition(pos)	
  Item:setWorldRotation(rot)
end

-- function for tricky get wordrotation and wordposition from entity
-- entity-connected entity e.g. table
-- id - some item name
-- pos - position offset - {x,y,z}
-- rot - rotoation offset in deg - {a,b,c}
function transformSocket(entity,id,pos,rot)
	-------- Create socket component in entity ----------------
	entity:createComponent("Socket","false_socket")
	local sock = entity.false_socket	
	sock:setRotationAngles(rot[1],rot[2],rot[3])
	sock:setOffset(vec(pos[1],pos[2],pos[3]))
	
	-------- Create some item in new socket ----------------
	local false_item = spawn(id)
	sock:addItem(false_item.item)
	
	-------- Get information of word position and rotation of socketed item ----------------
	local rotx = false_item:getWorldRotation()
	local posx = false_item:getWorldPosition()
	
	-------- Destroy item and socket component ----------------
	entity:removeComponent("false_socket")
	false_item:destroy()
	
	-------- Return word position and word rotation for correct item ----------------
	return posx,rotx
end

My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
The cube
Posts: 94
Joined: Tue Apr 23, 2013 6:09 pm
Location: Barren Desert

Re: Ask a simple question, get a simple answer

Post by The cube »

Tried to search, but found nothing.

How do i check the id of an item? Also, if i knew the id for the torch, would this script work?

Code: Select all

-- Torch or No torch?
function torchcheck()
    if party.party:isHolding("torchID") == false then
	dungeon_pit_trapdoor_1:close
end
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

The cube wrote:Tried to search, but found nothing.

How do i check the id of an item? Also, if i knew the id for the torch, would this script work?

Code: Select all

-- Torch or No torch?
function torchcheck()
    if party.party:isHolding("torchID") == false then
	dungeon_pit_trapdoor_1:close
end
Is the :isHolding() method new? It's not listed in the scripting reference, and it's not accepted in the editor version that I have.

:isCarrying() is accepted, but seems to only return false... never true. For example: party.party:isCarrying("torch_1") returns false regardless of having torch_1 in the hand, or in the inventory slots.
Eburt
Posts: 69
Joined: Thu Feb 05, 2015 5:44 am

Re: Ask a simple question, get a simple answer

Post by Eburt »

Is it possible to define new screen effects? I simulated this by adding a particle effect to the party, offset slightly forward but it doesn't look right if the camera is moved in free-look. Note that my screen effect can be present for long periods of time, unlike many of the relatively quick ones in the original game.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

"Screen effects" are just any particle system that you play via PartyComponent:playScreenEffect(). Look at the particle system definitions in the asset pack for how to position them. In fact, screen effects work by using a ParticleComponent attached to the party! The component is named "screenEffect".
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.
Post Reply