Ho do I make a simple mod?

Post » Sun Jun 17, 2012 8:54 pm

I want to make a mod that will disable fast travel, (Except for cart and horse), but I have never made a mod before.

Can anyone help, or if you already have this mod, can you upload it with a link so I could use it? Tyvm.
User avatar
evelina c
 
Posts: 3377
Joined: Tue Dec 19, 2006 4:28 pm

Post » Sun Jun 17, 2012 5:58 pm

You'll want to call this function from a script - http://www.creationkit.com/EnableFastTravel_-_Game
Note that fast travel will need to be re-enabled on uninstallation, or it will remain disabled.

Take a look at the wiki's http://www.creationkit.com/Category:Papyrus for more details on scripting.

It might be possible to do this via the console, but I'm not sure. Perhaps someone else could confirm.

Cipscis
User avatar
Ludivine Poussineau
 
Posts: 3353
Joined: Fri Mar 30, 2007 2:49 pm

Post » Sun Jun 17, 2012 1:18 pm

Yes, it can be done by the console, but when you load a new area, or move at all, it gets re-enabled.


Ty though. I'll give it a try.
User avatar
Louise Dennis
 
Posts: 3489
Joined: Fri Mar 02, 2007 9:23 pm

Post » Sun Jun 17, 2012 7:20 pm

Ya... I truly do not know what I am doing... :(
User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am

Post » Sun Jun 17, 2012 9:23 pm

Would this work?

Scriptname NoFastTravel extends ObjectReference

EnableFastTravel(false)
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am

Post » Sun Jun 17, 2012 10:54 pm

No, you'll need to wrap it in an event. Events are pretty much functions, except native events are called by the game when certain things happen, so they allow you to react to events in the game and they provide you with an entry point.

The http://www.creationkit.com/OnInit event would probably be a good candidate.

Cipscis

EDIT:

I'd also recommend using a quest script (attached to a quest), which means you'll need your script to extend Quest, instead of ObjectReference.

Cipscis
User avatar
Dan Wright
 
Posts: 3308
Joined: Mon Jul 16, 2007 8:40 am

Post » Sun Jun 17, 2012 6:04 pm

----->

:(


A bit over my head.I guess I am on the right track though, tyvm. Sorry for my stupidity.

User avatar
Britta Gronkowski
 
Posts: 3475
Joined: Mon Apr 09, 2007 3:14 pm

Post » Mon Jun 18, 2012 1:12 am

I haven't seen anything here I'd call stupidity :)

You're definitely on the right track, and a little project like this is a great learning experience. Keep at it, and you'll get there.

Cipscis
User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm

Post » Sun Jun 17, 2012 1:08 pm

{code}
Scriptname NoFastTravel extends Quest

EVENT onInit()

EnableFastTravel(false)

endEVENT
{/code}
This better?
User avatar
Avril Churchill
 
Posts: 3455
Joined: Wed Aug 09, 2006 10:00 am

Post » Sun Jun 17, 2012 9:56 pm

You should remove the first call to EnableFastTravel, and you might need to import Game, but give that a go and see if it works.

P.S. Please use code tags - they make code easier to read and maintain formatting. For example, just replace the curly brackets with square ones: {code}Here's some code{/code}

Cipscis
User avatar
Robert Garcia
 
Posts: 3323
Joined: Thu Oct 11, 2007 5:26 pm

Post » Mon Jun 18, 2012 12:53 am

Changed.

What do you mean by import game?
User avatar
Peter lopez
 
Posts: 3383
Joined: Mon Sep 10, 2007 5:55 pm

Post » Sun Jun 17, 2012 5:39 pm

The wiki documentation seems to indicate that http://www.creationkit.com/EnableFastTravel_-_Game is a global function, so you shouldn't need to, but what I meant was adding a line like this near the top of your script:
import Game

I thought this might be necessary because I knew that http://www.creationkit.com/EnableFastTravel_-_Game is declared in the http://www.creationkit.com/Game_Script, and that the http://www.creationkit.com/Quest_Script doesn't extend Game, so I thought you might need to http://www.creationkit.com/Import the Game script in order to make EnableFastTravel available in your script.

Because the http://www.creationkit.com/Function_Reference#Function_Header keyword is used when declaring EnableFastTravel, this isn't necessary, as it should be accessible to any script.

Cipscis
User avatar
Taylrea Teodor
 
Posts: 3378
Joined: Sat Nov 18, 2006 12:20 am

Post » Mon Jun 18, 2012 2:19 am

{code}

Scriptname NoFastTravel Hidden
{Scriptname NoFastTravel extends Quest

import Game

EVENT onInit()

EnableFastTravel(false)

endEVENT}

{/code}

Tried it with and without the import Game.

Looks like the CK changed it a little too.Doesn't seem to work. I can still fast travel.
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Mon Jun 18, 2012 2:05 am

Just making sure - have you compiled your script? How is the plugin file itself set up? Also, why do you have two ScriptName lines now? You should only have one.

It might help to add a line calling http://www.creationkit.com/Trace_-_Debug (you'll need to turn the log on in one of Skyrim's ini files), or something like http://www.creationkit.com/MessageBox_-_Debug, so you can check that your script is running.

P.S. Oops, perhaps I forgot to mention that you need to use square brackets instead of curly ones in code tags. I used curly ones so that they wouldn't be interpreted as actual code tags.

Cipscis
User avatar
-__^
 
Posts: 3420
Joined: Mon Nov 20, 2006 4:48 pm

Post » Sun Jun 17, 2012 3:56 pm

The CK added the line at the top.

Yes I compiled it. I made sure it was loaded in the Data Files on the Skyrim launcher.Alos, If I don't have the line at the top, it fails the compiling.
User avatar
Baylea Isaacs
 
Posts: 3436
Joined: Mon Dec 25, 2006 11:58 am

Post » Sun Jun 17, 2012 11:41 am

Oh! Your entire script is wrapped up in curly braces - {}
Those braces signify the script's tooltip. Remove them, and recompile your script.

Cipscis
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Sun Jun 17, 2012 9:25 pm

Keeps failing now.
Scriptname NoFastTravel extends ObjectReferenceEVENT onInit()            EnableFastTravel(false)endEVENT
This one compiles, but does not work.
User avatar
hannah sillery
 
Posts: 3354
Joined: Sun Nov 26, 2006 3:13 pm

Post » Sun Jun 17, 2012 11:41 am

The compilation? Does it give an error message that you could post here?

Cipscis
User avatar
AnDres MeZa
 
Posts: 3349
Joined: Thu Aug 16, 2007 1:39 pm

Post » Sun Jun 17, 2012 2:39 pm

The compilation? Does it give an error message that you could post here?

Cipscis

No it does not.I run the compiler, then it closes. I have to watch carefully for the success or fail.No errors, just a pass or fail. Some how I got it to stay open.
User avatar
Katie Pollard
 
Posts: 3460
Joined: Thu Nov 09, 2006 11:23 pm

Post » Sun Jun 17, 2012 12:28 pm

I think the compiler will close automatically if it's successful, presuming you ran it from the Creation Kit. I usually run it from Notepad++ (see http://www.creationkit.com/Notepad%2B%2B_Setup) in which case I get a message either way.

You could test if it's completing correctly by deleting the compiled script (in Data/Scripts) and then recompiling. If it appears, then the compilation was a success.

Does it work in-game now?

Cipscis
User avatar
Joie Perez
 
Posts: 3410
Joined: Fri Sep 15, 2006 3:25 pm

Post » Mon Jun 18, 2012 2:20 am

Nope, still does not work in game.
User avatar
Dagan Wilkin
 
Posts: 3352
Joined: Fri Apr 27, 2007 4:20 am

Post » Sun Jun 17, 2012 3:33 pm

Okay, I assume it compiled successfully then. Have you added any debug lines to it yet? We could use those to test if the right part of your script is running at all, which will help to diagnose the problem.

The easiest debug command for you to use would probably be http://www.creationkit.com/MessageBox_-_Debug, as this doesn't require and ini changes or looking at any external logs.

Cipscis
User avatar
Gwen
 
Posts: 3367
Joined: Sun Apr 01, 2007 3:34 am

Post » Sun Jun 17, 2012 9:44 pm

Tried adding

 Debug.MessageBox("Hello, world!") 

Nothing happened.
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Sun Jun 17, 2012 11:01 am

Okay, assuming the script recompiled correctly that means it wasn't running for some reason.

First things first: let's double-check the simple stuff. The plugin file is saved, up to date, and loaded when you start the game?

If that's all right, or if it still doesn't work after fixing that, can you tell me how your quest is set up? Most importantly, what flags are checked in the Quest dialogue window?

Cipscis
User avatar
naome duncan
 
Posts: 3459
Joined: Tue Feb 06, 2007 12:36 am

Post » Sun Jun 17, 2012 5:57 pm

I compile, then file and save. It is check in the Skyrim launcher's Data File.

I don't know how to tell if it is loaded.

When I try with the

 extends Quest 

It won't let me compile.

I have been trying with the

 extends ObjectReference 

because that one compiles.I have no Quest set up at all.
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am

Next

Return to V - Skyrim