Haggard Games Forum
Editor and tools - Printable Version

+- Haggard Games Forum (http://www.haggardgames.com/forum)
+-- Forum: Games (/forumdisplay.php?fid=1)
+--- Forum: Editor (/forumdisplay.php?fid=21)
+--- Thread: Editor and tools (/showthread.php?tid=1605)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


RE: Editor and tools - ComradeReptiloid - 08-10-2016 06:59 AM

(08-10-2016 06:34 AM)allrounder18 Wrote:  I was asking about how to change starting uniform for player character ie stragov.
I hope you read and understanded all my answers then.

All credits go to Liz Shaw user for interaction idea:



8:10 part lost during editing. You need to write T112 in TestUniqueID and RADI in action description. You can find RADI in missiontext.shadvs and change description string or you can create new for you RAD2 (or whatever you called your radio).
Two easter eggs in the end. I try to fix ai priorities, so body move able to work 100% of times, curently 2-3 of 10 times.


RE: Editor and tools - Liz Shaw - 08-10-2016 08:40 AM

(08-10-2016 06:59 AM)ComradeReptiloid Wrote:  All credits go to Liz Shaw user for interaction idea:



8:10 part lost during editing. You need to write T112 in TestUniqueID and RADI in action description. You can find RADI in missiontext.shadvs and change description string or you can create new for you RAD2 (or whatever you called your radio).
Two easter eggs in the end. I try to fix ai priorities, so body move able to work 100% of times, curently 2-3 of 10 times.

Thanks for replicating what I've done. It's not 100% how I did it, but it is similar. I actually struggled to get the bartender to turn the radio off as soon as he puts the tray down, but I eventually got there. I did it by adding an extra string here:

--------------------------------------------------------
-- Name: Level.FailBarmenPickTray()
-- Desc:
--------------------------------------------------------
function Level.FailBarmenPickTray()
local actor = Level.FindActor('WR05');

if ( Actor.HasItem( actor, 'TR01' ) == true ) then
Actor.DropItem( actor, Level.FindItem('TR01') );
end;

if ( Level.BarmenRadio == true ) then
Level.RunAnchorJob( AI.FindNPC('WR05'), 'AN01', true );
else
AI.SetJob( AI.FindNPC('WR05'), 'bar_clean' );
end;

Level.TrayLocked1 = false;
end


RE: Editor and tools - ComradeReptiloid - 08-10-2016 01:15 PM

(08-10-2016 08:40 AM)Liz Shaw Wrote:  
(08-10-2016 06:59 AM)ComradeReptiloid Wrote:  All credits go to Liz Shaw user for interaction idea:



8:10 part lost during editing. You need to write T112 in TestUniqueID and RADI in action description. You can find RADI in missiontext.shadvs and change description string or you can create new for you RAD2 (or whatever you called your radio).
Two easter eggs in the end. I try to fix ai priorities, so body move able to work 100% of times, curently 2-3 of 10 times.

Thanks for replicating what I've done. It's not 100% how I did it, but it is similar. I actually struggled to get the bartender to turn the radio off as soon as he puts the tray down, but I eventually got there. I did it by adding an extra string here:

--------------------------------------------------------
-- Name: Level.FailBarmenPickTray()
-- Desc:
--------------------------------------------------------
function Level.FailBarmenPickTray()
local actor = Level.FindActor('WR05');

if ( Actor.HasItem( actor, 'TR01' ) == true ) then
Actor.DropItem( actor, Level.FindItem('TR01') );
end;

if ( Level.BarmenRadio == true ) then
Level.RunAnchorJob( AI.FindNPC('WR05'), 'AN01', true );
else
AI.SetJob( AI.FindNPC('WR05'), 'bar_clean' );
end;

Level.TrayLocked1 = false;
end
Awesome idea, i'm not good programmer, so you can probably optimize my scripts if you know how.
I dont wont to fuck with addictional scripts. My very first thought was adding AI.SetJob instead of anchor list, but doing this resulting in game crash after activating radio.

Can you clarify one thing for me. If npc start start pour_wine job by taking tray and distracted by radio, does it mean that after switching off radio he proceed to bar_clean full loop again instead of pour_wine continuation? What if he has tray and wine already? did he drop tray on the floor and wine break, because i dont see this conditions in Level.OnCheckConsNeedWine(). is it possible to use Level.PutTrayOnBar instead of Actor.DropItem and i never saw bartender callback to Level.FailBarmenPickTray() in vanilla. How does it look in game? Tray just dissapears from his hands or he drop it on floor?


RE: Editor and tools - Liz Shaw - 08-10-2016 01:22 PM

(08-10-2016 01:15 PM)ComradeReptiloid Wrote:  Can you clarify one thing for me. If npc start start pour_wine job by taking tray and distracted by radio, does it mean that after switching off radio he proceed to bar_clean full loop again instead of pour_wine continuation? What if he has tray and wine already? did he drop tray on the floor and wine break, because i dont see this conditions in Level.OnCheckConsNeedWine(). is it possible to use Level.PutTrayOnBar instead of Actor.DropItem and i never saw bartender callback to Level.FailBarmenPickTray() in vanilla. How does it look in game? Tray just dissapears from his hands or he drop it on floor?

When I was implementing the interaction, I found that he'll just walk to the radio with the tray and drink in hand and turn it off, and then next time he sets the tray down, the drink breaks. I made sure it doesn't happen.


RE: Editor and tools - allrounder18 - 08-10-2016 01:45 PM

I think you two guys should give it a shot on making detail video on how to setup interaction in a dummy way guide , I am not grasping it Sad


RE: Editor and tools - ComradeReptiloid - 08-10-2016 03:15 PM

(08-10-2016 01:22 PM)Liz Shaw Wrote:  I found that he'll just walk to the radio with the tray and drink in hand and turn it off, and then next time he sets the tray down, the drink breaks. I actually struggled to get the bartender to turn the radio off as soon as he puts the tray down
Pardon my stupidity, i misread your script. It dont matter for me, if bartender goes right after putting tray down or after glass. But it nice way to optimize your work nonetheless.
As i stated earlier - messing with bartender jobs crash game for me for some reason. Everyone else use Liz script, it shorten time of writing scripts immensely!
(08-10-2016 01:45 PM)allrounder18 Wrote:  I think you two guys should give it a shot on making detail video on how to setup interaction in a dummy way guide , I am not grasping it Sad
I recorded step-by-step video. What you dont understand exactly?


RE: Editor and tools - allrounder18 - 08-10-2016 09:21 PM

(08-10-2016 03:15 PM)ComradeReptiloid Wrote:  
(08-10-2016 01:22 PM)Liz Shaw Wrote:  I found that he'll just walk to the radio with the tray and drink in hand and turn it off, and then next time he sets the tray down, the drink breaks. I actually struggled to get the bartender to turn the radio off as soon as he puts the tray down
Pardon my stupidity, i misread your script. It dont matter for me, if bartender goes right after putting tray down or after glass. But it nice way to optimize your work nonetheless.
As i stated earlier - messing with bartender jobs crash game for me for some reason. Everyone else use Liz script, it shorten time of writing scripts immensely!
(08-10-2016 01:45 PM)allrounder18 Wrote:  I think you two guys should give it a shot on making detail video on how to setup interaction in a dummy way guide , I am not grasping it Sad
I recorded step-by-step video. What you dont understand exactly?

Didnt under stand the scripts part at all primarily because I didn't understand what each command suppose to do , also I don't understand Russian interface from the video.


RE: Editor and tools - Liz Shaw - 08-10-2016 10:02 PM

(08-10-2016 09:21 PM)allrounder18 Wrote:  Didnt under stand the scripts part at all primarily because I didn't understand what each command suppose to do , also I don't understand Russian interface from the video.

It was mostly cloning the scripts for Cataldo's interaction with the radio and replacing certain things. And I use Notepad to view and edit the LUA file. I don't know what program ComradeReptiloid was using.


RE: Editor and tools - ComradeReptiloid - 08-10-2016 10:09 PM

(08-10-2016 09:21 PM)allrounder18 Wrote:  Didnt under stand the scripts part at all primarily because I didn't understand what each command suppose to do , also I don't understand Russian interface from the video.

You need a good grasp of computer programming basics to understand code. Try watching tutorials on youtube or downloading books on coding. You can download .lua language manual, but again - you dont need much experience or prior knowledge to programm basic scripts. Check this article for more info: https://www.quora.com/How-do-I-learn-C++-quickly-without-any-prior-knowledge-of-programming
And i pretty sure that i added descriptions for every function. It was example, i can record video on every possible interaction, but it will take so much time to do.

On russian interface: you dont miss nothing important, i just used Find function to show where you need to place your scripts (not very important for new scripts, but still heps to find them more easily). I switch language to English next time.

(08-10-2016 10:02 PM)Liz Shaw Wrote:  It was mostly cloning the scripts for Cataldo's interaction with the radio and replacing certain things. And I use Notepad to view and edit the LUA file. I don't know what program ComradeReptiloid was using.

I used Notepad++ - very good for programming (huge base of syntaxes) and many extra functions. Yes, pretty much it. Clone and replace.


RE: Editor and tools - Hiei- - 08-11-2016 01:46 AM

(08-10-2016 04:56 AM)ComradeReptiloid Wrote:  
(08-10-2016 04:04 AM)Hiei- Wrote:  Oh, I don't even search how to edit models, the ones included in the levels would be fine for now.

Just how to setup four walls, a roof, a door and for the textures, the ones used for the walls in the official levels would be fine, for now.

Thanks for all your work Smile

You cant do it like that. There is no brush objects like roofs and walls. But you can create simplest models in 3dsmax 2009 and export them in the game. All buildings in the game either full models or giant blocks for big buildings. Like castle in mission 1 created from 4 blocks.
But you dont need create, if you can borrow something better Wink

Ok, okay, I see. So basically, I just have to create the room in 3ds max 2009 then export it?

@allrounder18 : Haven't read everything yet but maybe you try to change to many things at a time? Maybe try to take more time to get more knowledge about the levels before starting to do more complicated things?

About the russian interface, you can just check with the english one to see the english names (in the russian one, words are at the same place).