[REQWIP] ModFood: Snippets & Tips

Post » Mon May 07, 2012 8:48 am

Went on a very awkward vacation, don't ask why we did it in Febuary cuz I don't know, but I'm back now :)

B.T.W, why do you change your sig like, every other week logam.

I do it for a bit of change i guess :P

Same with my avatar... :rofl:

Felic, i added your thread to Modders Resource. :)
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Mon May 07, 2012 10:05 am

I'm busy collating all there is in the wiki and the forums into a word document at the moment, at present time it's almost all links to either the wiki, this forum, or one other site i managed to find during a web trawl.

BTW, I can't seem to tell if this Word Document is Macro'd or not, so I'll save it once as a word document, and once as an Open Office Document. DL either, and if you wish to email me, I'll open up my gmail addy on request (I'm weary of spammers...)
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Mon May 07, 2012 2:41 pm

Please use PDF, I'll convert for you...

EDIT: NVM, found it. Dizzy from all the threads... :wacko:
User avatar
Lovingly
 
Posts: 3414
Joined: Fri Sep 15, 2006 6:36 am

Post » Mon May 07, 2012 6:35 pm

Please use PDF, I'll convert for you...

It turns out that Open Office will do it gladly :) It's the second last one down. Also, if you *do* have word (or open Office) and you want to contribute, simply edit away :D

Making the thing you want as a title a heading 1 will have the biggest title in the Table of contents.
A Heading 2 will be the Second Biggest
And a heading 3 will be a side title.

Imagine a large book with many mini-stories in it. The mini-story is the Story, Heading 2 the Chapter and heading 3 the.... page?

All similarity is lost, will take some headache tablets now :P
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Mon May 07, 2012 6:39 pm

No worries, I got years of experience as a temp and web developer, so can create stylesheets in word in my sleep, I just hate it.
User avatar
Markie Mark
 
Posts: 3420
Joined: Tue Dec 04, 2007 7:24 am

Post » Mon May 07, 2012 7:03 pm

Cool, I just do whatever the teacher tells me to :P but needless to say, I'm learning all the time eh?
User avatar
Dean Brown
 
Posts: 3472
Joined: Fri Aug 31, 2007 10:17 pm

Post » Mon May 07, 2012 5:30 am

Objective: Making a realistic creature statue when you don't know 3D modeling

NOTE: I edited this as I found it doesn't really work with NPCs, just creatures.

Thanks to Reznod for a lot of ideas and solutions!

Wanna make a custom statue, or stuffed actor :lol:, for your ?ber house mod? Cool, but before we get started, there's one drawback with this method: the animation plays when the player enters the cell, so you have to place the statue out of the PoV the player has when they enter the cell. Around a corner, in an alcove, or something along those lines.

OK, there are several steps to be taken here. First, pick your creature and dupe it. Check No Low Level Processing, remove any packages from the AI, remove Factions and any unnecessary Inventory and Spells. Then pick your spot, maybe add a pedestal of some sort, and position your statue.

Now let's build the scripts. One thing we need to take care of is disabling the Detect Life visuals on the statue. This is done via an Ability with Script Effect. So first create a new script, and select Magic Effect in the drop down menu at the top. Then enter this code and save.

Scn aaaStatueDDLVBegin ScriptEffectUpdate	StopMagicShaderVisuals LifeDetectedEnd

Now create a new spell with ID aaaStatueAb and Type Ability (name it what you want). Check the options Disallow Spell Absorb/Reflect, Script Effect Always Applies, and Immune to Silence just to be safe. Now right-click in the Effects and choose Script Effect. Select the Script we just created and uncheck Effect is Hostile (you can also give it a name if you want). Add this spell to your statue's spell list.

OK, now the script that plays an animation group and freezes the creature in place. You'll need to pick an animation group. There's a complete list http://cs.elderscrolls.com/constwiki/index.php/AnimGroups (note most creatures don't have all of these: you can see the groups available for the actor you're using in their Animation tab). You're also going to have to experiment a little to get the exact pose you want by changing the timer check value. In this script, you will also have to change the 0 values for the setPos x,y,z,angle lines to the position you chose for your actor (double-click on the actor in the Render Window to get these values; it's best to round them). So create a new script (using default Object type), and paste in this code (you can remove the comments), then change the values as mentioned just above:

Scn aaaNoMoveScriptFloat TimerShort doOnceBegin onLoad; resets timer for current cell load	set Timer to 0; resets var for current cell load, so setRestrained/setGhost aren't called every frame	set doOnce to 0; need to input values for these or else actor will spawn in between path grid nodes	setPos x 0	setPos y 0	setPos z 0	setAngle z 0; turn on for weapon drawn anim; use 0 for no weapon drawn	SetAlert 1; pick group from list provided	PlayGroup AttackForwardPower, 1EndBegin GameMode; change value for desired pose	if ( Timer < 0.5 ); this increments timer var to be able to stop anim		set Timer to ( Timer + GetSecondsPassed )	else; these only need to be set once when player enters cell		if doOnce == 0			set doOnce to 1; Unconscious actors do not "think" at all; this is not absolutely necessary, but can't hurt			setUnconscious 1; Restrained actors will not move from their current position, but will continue to "think" (pick packages, run detection so they could yell alarms) & go into dialogue			setRestrained 1; no combat, not harmed by hits/spells, will talk, cannot be pickpocketed			setGhost 1		endif; causes the current animation to not be played for this frame	skipAnim	endifEnd

Now attach this script to your statue by opening the actor window and selecting the script from the drop down menu. Go in the game and check the result, and adjust the Anim Group and Timer stop value to get the pose you want.

Fini!
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Post » Mon May 07, 2012 5:47 am

This is definitely going into the tutorial section ^_^. Very cool Felic.
User avatar
Racheal Robertson
 
Posts: 3370
Joined: Thu Aug 16, 2007 6:03 pm

Post » Mon May 07, 2012 12:53 pm

Objective: Locking items in place

Do you want to place a weapon or shield on the wall and it keeps falling down in game when you get near it? Or do your books fly out of whack coz you placed them like they should look on a shelf but the Havok engine doesn't account for that? Try attaching this script to a dupe of the object (you don't want to lock all the same objects in the game; also does not work on actors, see the tutorial on making a statue in this thread for that).

Scn aaaNoMoveScriptFloat MyXFloat MyYFloat MyZFloat MyAxFloat MyAyFloat MyAzBegin onLoad	Set MyX to GetPos X	Set MyY to GetPos Y	Set MyZ to GetPos Z	Set MyAx to GetAngle X	Set MyAy to GetAngle Y	Set MyAz to GetAngle Z	setPos x MyX	setPos y MyY	setPos z MyZ	setAngle x MyAx	setAngle y MyAy	setAngle z MyAzEnd
User avatar
OJY
 
Posts: 3462
Joined: Wed May 30, 2007 3:11 pm

Post » Mon May 07, 2012 9:12 am

Neat trick. Now I ask, is there a way to do the same to npc's? Like a ragdoll poser or something? That'll be a fun thing to add.
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Mon May 07, 2012 10:45 am

It's the previous tutorial, see just above.
User avatar
Je suis
 
Posts: 3350
Joined: Sat Mar 17, 2007 7:44 pm

Post » Mon May 07, 2012 9:30 am

No, when I mean pose them, I mean "grab their leg and freeze it" Then move their arm and freeze it. What I want is to make them statues in-game. If possible, they should be unlockable. Basically the it's going to be a Gmod posergun.
User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Mon May 07, 2012 1:41 pm

Ah, I see now. Don't think that's possible, since the skeleton is a single mesh. Actors in Charge and Rez's Mannequins both use animation files (.kf) to pose actors.
User avatar
Connor Wing
 
Posts: 3465
Joined: Wed Jun 20, 2007 1:22 am

Post » Mon May 07, 2012 9:13 am

Hmm, I might have a look at them...
User avatar
Tanya
 
Posts: 3358
Joined: Fri Feb 16, 2007 6:01 am

Post » Mon May 07, 2012 8:08 am

Objective: Mark & Recall Teleportation Spells

Make two spells that allow you to mark a spot that you can return to via the recall spell from anywhere in the game.

Thanks to weasel93 for the script.

Place a teleport marker somewher in Tamriel and give it a Reference ID (let's use "aaaMarkRecallTeleport").
Create a "Mark" spell and attatch this script via Script Effect (and give it a cool visual effect):

Scn aaaMarkSpellScriptBegin ScriptEffectStart	PlaceAtMe aaaMarkRecallTeleport 1, 0, 0	MessageBox "You have marked this location."End

Then make a "Recall" spell and attatch this script to it:

Scn aaaRecallSpellScriptBegin ScriptEffectStart	Player.MoveToMarker aaaMarkRecallTeleportEnd

Fini!

Can you use PlaceAtMe with references? I always thought it would have to be an Object ID, not a unique reference. It's probably safer to use a MoveTo command:
Begin ScriptEffectStart	aaaMarkRecallTeleport.MoveTo player	MessageBox "You have marked this location"End
User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am

Post » Mon May 07, 2012 5:09 am

Right, thanks for the heads up, I'll fix that.
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Mon May 07, 2012 3:53 am

QUOTE(Felic @ Feb 26 2007, 05:18 PM)

Hey Logam, I'll bump yours if you bump mine!

Official Requested Bump :P

Good Thread Felic, Keep up the great work! ^__^
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Mon May 07, 2012 3:28 am

Objective: Wearing an Amulet that makes Wildlife (or anything) Passive towards you

=============================================================
Works great to make certain animals not attack you when worn.
=============================================================

1. Create 'Spell' called 'HeroPeaceAbility' that is an ability. Give it effects if you like.
-Example: Resist disease @ 100%

2. Create a 'Faction' called 'HeroPredators'.
- Give it a name, 'Peaceful Wildlife'.
- In the 'Interfaction Relations' box, add the 'HeroPredators' and make the Disposition Modifier '100'.

3. Add the new faction 'HeroPredators' to all the creatures you want to be passive when the amulet is worn.

4. Create a new Script:
scn HeroAmuletPeaceScriptbegin OnEquip player	Player.SetFactionRank HeroPredators 0	Player.AddSpell HeroPeaceAbilityendbegin OnUnequip player	Player.SetFactionRank HeroPredators -1	Player.RemoveSpell HeroPeaceAbilityend

5. Create a new amulet Items+Clothing+Amulets.
- Give it an ID, Name, add the script 'HeroAmuletPeaceScript', value, and make sure it is checked playable.

6. Drop the amulet into the gameworld where you want to pick it up.
User avatar
kat no x
 
Posts: 3247
Joined: Mon Apr 16, 2007 5:39 pm

Post » Mon May 07, 2012 2:27 pm

Thanks WillieSea. Added it to the index. :)
User avatar
Kelly John
 
Posts: 3413
Joined: Tue Jun 13, 2006 6:40 am

Post » Mon May 07, 2012 6:44 am

Right, so I've written my own Mark/Recall spells using the information here. Took me a while to figure out how to make the doors, and make them invisible, and make them non-usable except for the spells, but I did it. Maybe there's a magical "place teleport reference here" button, but I couldn't find it. :(

Now I just need to figure out how to disable changes to the weather when I recall (and re-enable them afterwards, I think). ><

After that I'm gonna write myself a bound arrows spell too. I'd been thinking along those lines recently and then I saw someone else's thread about it. :) Thanks for the great info here guys!
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Mon May 07, 2012 3:47 pm

OBJECTIVE: Setting Outside weather to be the same on the Inside cell
When using "Behave like Exterior" on your inside cell.

====================================
Tamriel Weather Types
====================================
CamoranWeather 000370CE
Clear 00038EEE
Cloudy 00038EFE
DefaultWeather 0000015E
Fog 00038EEF
Overcast 00038EEC
Rain 00038EF2
Snow 00038EED
Thunderstorm 00038EF1

OblivionStormTamriel - 000836D5
OblivionStormTamrielMQ16 0006BC8B

===================================================

1. Create a global variable called 'HeroWeatherType'.

2. OUTSIDE: This script goes on an activator close to the door that leads inside:

Scn HeroArenaSetScriptBegin GameMode	if ( HeroWeatherType == 0 )		if ( getdistance player < 400 )			set HeroWeatherType to 1			if ( GetIsCurrentWeather "Clear" )				set HeroWeatherType to 1			endif			if ( GetIsCurrentWeather "Cloudy" )				set HeroWeatherType to 2			endif			if ( GetIsCurrentWeather "DefaultWeather" )				set HeroWeatherType to 3			endif			if ( GetIsCurrentWeather "Fog" )				set HeroWeatherType to 4			endif			if ( GetIsCurrentWeather "Overcast" )				set HeroWeatherType to 5			endif			if ( GetIsCurrentWeather "Rain" )				set HeroWeatherType to 6			endif			if ( GetIsCurrentWeather "Snow" )				set HeroWeatherType to 7			endif			if ( GetIsCurrentWeather "Thunderstorm" )				set HeroWeatherType to 8			endif		endif	endifEnd

===================================================

2. INSIDE: This script goes on an activator close to the door that leads back outside.

Scn HeroArenaLoadScriptBegin GameModeif ( HeroWeatherType > 0 )	if ( getdistance player < 400 )		if ( HeroWeatherType == 1 )			ForceWeather "Clear"			Set HeroWeatherType to 0		elseif ( HeroWeatherType == 2 )			ForceWeather "Cloudy"			Set HeroWeatherType to 0		elseif ( HeroWeatherType == 3 )			ForceWeather "DefaultWeather"			Set HeroWeatherType to 0		elseif ( HeroWeatherType == 4 )			ForceWeather "Fog"			Set HeroWeatherType to 0		elseif ( HeroWeatherType == 5 )			ForceWeather "Overcast"			Set HeroWeatherType to 0		elseif ( HeroWeatherType == 6 )			ForceWeather "Rain"			Set HeroWeatherType to 0		elseif ( HeroWeatherType == 7 )			ForceWeather "Snow"			Set HeroWeatherType to 0		elseif ( HeroWeatherType == 8 )			ForceWeather "Thunderstorm"			Set HeroWeatherType to 0		elseif ( HeroWeatherType > 8 )			ForceWeather "Clear"			Set HeroWeatherType to 0		endif	endifendifend

===================================================

3. OUTSIDE: This script goes on an activator a bit further from the door that leads inside: This will reset the HeroWeatherType so it will correctly report to script #1 the true weather.

The player MUST pass close by this activator on entry and exit to the doorway to the interior cell. I put it under the ground on the path to the doorway. NOTE: Dont place it too close to the activator #1.

Scn HeroArenaResetScriptBegin GameMode	if ( HeroWeatherType > 0 )		if ( getdistance player < 200 )			set HeroWeatherType to 0		endif	endifend
User avatar
Emily Graham
 
Posts: 3447
Joined: Sat Jul 22, 2006 11:34 am

Post » Mon May 07, 2012 5:55 pm

Keep them coming, great work so far! :goodjob:
User avatar
Hilm Music
 
Posts: 3357
Joined: Wed Jun 06, 2007 9:36 pm

Post » Mon May 07, 2012 12:51 pm

OBJECTIVE: Close and lock opened door.

With this script, you can set the door to automatically close AND lock.
After the player unlocks a door, a 10 second timer starts counting. The door is then closed, and after 2 seconds, it is re-locked. Can be used like a trap.

scriptname TELElockScriptfloat timershort doWhatBegin GameMode	if ( getlocked )	else		if timer > 0			set timer to timer - getsecondspassed		else			if doWhat == 2				lock 100				set doWhat to 0				return			elseif doWhat == 1				set timer to timer + 2				setopenstate 0				set doWhat to 2				return			elseif doWhat == 0				set timer to timer + 10				set doWhat to 1				return			endif		endif	endifEnd

I have more, but I can't add another one until somebody else posts. Otherwise, it just adds the new post to the bottom of this post...
User avatar
Philip Rua
 
Posts: 3348
Joined: Sun May 06, 2007 11:53 am

Post » Mon May 07, 2012 4:31 am

Thanks again!
Actually, posting again in a new post is set on a timer I think. Not sure how long, but you should be able to add a new post after one hour at the most.
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Mon May 07, 2012 4:16 am

.
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

PreviousNext

Return to IV - Oblivion