Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Craig

Pages: [1] 2 3 ... 364
1
Mods / [Other] Re: TM PC Modding API
« on: May 24, 2018, 07:41:13 AM »
That is exactly what it was.

Now, when I hit the NPC, it plays the default player model noise. I supplied a sound file, and called upon ot for the ActorAudioData, but the sounds to not play. Do they have to be in a specific file format? I have them in .wav

ActorAudioData.xml doesn't yet support specifying external sound files. It only allows specifying sound 'keys' used to identify the games existing built in sounds. I can post a list of these keys if you think it might help. To use external files, currently you need to do that using C#. I have plans to support external files from XML but it will be after multiplayer.

2
Video / Re: Farming Basics
« on: May 10, 2018, 07:08:54 AM »
Wheat > Sugar Cane > Tomato > Potato > Corn
Fruits/Berries/Tomato > Bottle Of Milk > Cheese > Bread > Duck Meat > Lamb Chops > Fish > Corn Bread > Beef > Pizza > Cake > Potato Pie

Great vid though :p

3
Your world / [Construction] Re: Civilizations
« on: May 05, 2018, 06:40:07 AM »
@Dauntless395 I have a copy I could throw up to the downloads page :p

4
Bug Reports [Retail] / Re: NPC AI
« on: May 05, 2018, 06:35:49 AM »
@JAZZ 0R KILLER It is bugged in the current retail version. I've fixed it now for the next update.

5
Ideas / Re: Script menu customization (?)
« on: April 29, 2018, 05:52:46 AM »
No, keep the folder/script names long (fully descriptive). Use the alias name for menu commands etc, that's what it's for.

6
Ideas / Re: Script menu customization (?)
« on: April 26, 2018, 08:04:11 AM »
Is this on PC? On PC there shouldn't be any limit.

7
Questions and Answers / [Unanswered] Re: couple npc questions
« on: April 11, 2018, 05:27:01 AM »
Yes that's right, the Stationary behaviour causes the NPC to be stationary (not move around), but it will turn to face the closest player. The Statue behaviour causes the NPC to be stationary and not look around either, i.e. face a fixed direction, but I think it might not work properly or at least it needs a way to define exactly what direction.

I don't plan on bringing back the old speech bubble, but the NPC dialog is still a work in progress, so some changes will likely still happen. Particularly around wanting NPC's to show large bodies of text.

8
Creative Features / [Help Needed] Re: menu script question
« on: April 11, 2018, 12:05:02 AM »
No. I've just added it. It will be in the next PC update.

9
Creative Features / [Help Needed] Re: menu script question
« on: April 10, 2018, 09:13:04 PM »
Ah ok, I see what you mean now. Currently there is no way to parameterize the options like that. You'd have to do a HasHistory/Menu pair for each combination, which as you know would quickly become out of control as more potions are added.

One solution I can think of would be something like this:

menu [[option1][script][show=var]] and the menu option is only shown if var > 0.

Then you could do something like:

var [pot1] = [history:potion1]
var [pot2] = [history:potion2]
etc.
menu [[Potion 1][Potion1Script][show=pot1]]  [[Potion 2][Potion2Script][show=pot2]] etc




10
Creative Features / [Help Needed] Re: menu script question
« on: April 10, 2018, 07:16:53 PM »
Yes that should be reasonably easy to do. See the HasHistory command.

11
General Discussion / Re: Question Time with Crazytater
« on: April 08, 2018, 06:21:00 AM »
Did you know that in the next version there is mod support for full texture packs?
Look lemon, I don't know who you think you are but we don't need your blatant self promotion here. Please only ask serious questions like everyone else.
Look Wolf with Hands that are actually Front Paws but could reasonably be called Hands because they are more like Hands than Feet even though they are used primarily for walking and running, I am just scum, but I tried to frame the question in a serious note, and could not find that right note, so left it like you see it. I tried. Please don't ban me.

12
Creative Features / [Scripts] Re: Random Reward Script
« on: April 08, 2018, 02:59:45 AM »

var [num] = [rand:2]

If
IsVar [num] [=] [0]
Then
Inventory [player] [add] [reward1] [1]
ElseIf
IsVar [num] [=] [1]
Then
Inventory [player] [add] [reward2] [1]
ElseIf
IsVar [num] [=] [2]
Then
Inventory [player] [add] [reward3] [1]
Else
EndIf


If this is what you mean it just gets a random number between 0-2, and then gives a certain item for each number

A slightly more streamlined version. Since if num is not 0 and not 1 we know it must be 2 so the last ElseIf is unnecessary.

var [num] = [rand:2]
If
IsVar [num] [=] [0]
Then
Inventory [player] [add] [reward1] [1]
ElseIf
IsVar [num] [=] [1]
Then
Inventory [player] [add] [reward2] [1]
Else
Inventory [player] [add] [reward3] [1]
EndIf


13
Mods / [WIP] Re: Dark Items - Topic
« on: April 08, 2018, 02:53:44 AM »
Freshly added to the game. Doesn't work.


remove the 2nd  XML from ArrayOfModBlockMaterialDataXMLXML

14
Mods / [WIP] Re: C# (Edit)
« on: April 08, 2018, 02:47:54 AM »
Code: [Select]
if (InputManager.IsKeyPressed(tmPlayer.PlayerIndex, Keys.P))
{
     SoundEffect sound = game.AudioManager.LoadSoundEffectFromStream(FileSystem.RootPath + Mod.Path + "357_reload1.wav");
     sound.Play();
}
While this code works, it has some flaws.

It will be loading and playing the sound effect 60 times a second. That will likely be problematic. Better to use InputManager.IsKeyPressedNew or InputManager.IsKeyReleasedNew. This ensures the sound effect is only played once per key press.

Also it is inefficient to load a sound effect from disk every time you want to play it. It will likely cause frame rate stutters. It is better to cache all sound effects by loading them once when the mod is initiailized (see the LockPick example on github).

Also if you plan on using the sound effect rapidly, like say for machine gun fire, then it is better to use the SoundEffectInstance type over the SoundEffect type. It allows more control the playing of several instances of the sound effect better, even if the sound overlaps each other, and gives other control you don't have with SoundEffect.

15
General Discussion / Re: Question Time with Crazytater
« on: April 08, 2018, 02:37:33 AM »
Did you know that in the next version there is mod support for full texture packs?

Pages: [1] 2 3 ... 364