Jump to content

A few questions about the CS


Ironman5000

Recommended Posts

I have been modding Fallout3, New Vegas and skyrim for while with quite a few mods out there. Now I want to have a go at making a big mod for Oblivion and could use a few pointers if anyone is willing to help me out, as I am still finding my feet in the CS.

 

Firstly a very basic question - where are the navmesh options in the CS? I can't find info on this for some reason but after a bit of testing it seems like NPCs are dependant on it.

 

 

Secondly, and slightly more complicated - I am using OBME to create a new summon spell that will take effect upon activating a custom activator using an edited script, the problem is that the actor I am trying to summon doesn't show up in my test cell. The script is based on a nine divines alter script which I edited to suit my needs, did I go wrong at some point?

 

ScriptName I5KAltarofSatyress

short doonce
short DayofLastUse
ref target

Begin OnActivate

if IsActionRef player == 1

	if GetDayofWeek == DayofLastUse
		MessageBox "You've already summoned a Satyress today."
	else
		MessageBox "You have summoned a Satyress protector!"
		Cast I5KSpellSummonSatyrF Player
		Set DayofLastUse to GetDayofWeek
	endif

else
	
	set target to GetActionRef
	Cast I5KSpellSummonSatyrF target

endif

end

begin gamemode

if doonce == 0											;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today
	set DayofLastUse to 10
	set doonce to 1
endif

end
Edited by Ironman5000
Link to comment
Share on other sites

I'm not familiar with the editor, but off hand, it looks like you have an error in the comment explaining why you set DayofLastUse to 10.

 

It doesn't seem to like the apostrophe in the word "you've". If you'll notice, everything past that point is in purple. But if that's the problem, I'm amazed this wouldn't crash the game.

 

Also, your "Begin OnActivate" is in all yellow. in your 'begin gamemode" 'begin' is green and 'gamemode' is blue. Granted the second one might be related to the apostrophe issue, but the difference between these two lines that I believe should have identical color formats sends up a red flag for me.

 

If that's not it, it's got to be in the spell itself.

Edited by KenJackson
Link to comment
Share on other sites

 

Firstly a very basic question - where are the navmesh options in the CS? I can't find info on this for some reason but after a bit of testing it seems like NPCs are dependant on it.

 

You can't find any information because Oblivion doesn't use NavMeshes, it uses Pathgrids.

http://www.bizarretshirts.com/pictures/have_the_dumb.jpg

;D Thanks, I should have realised this really.

Link to comment
Share on other sites

I'm not familiar with the editor, but off hand, it looks like you have an error in the comment explaining why you set DayofLastUse to 10.

 

It doesn't seem to like the apostrophe in the word "you've". If you'll notice, everything past that point is in purple. But if that's the problem, I'm amazed this wouldn't crash the game.

 

Also, your "Begin OnActivate" is in all yellow. in your 'begin gamemode" 'begin' is green and 'gamemode' is blue. Granted the second one might be related to the apostrophe issue, but the difference between these two lines that I believe should have identical color formats sends up a red flag for me.

 

If that's not it, it's got to be in the spell itself.

What you see here is the syntax highlighting of a 3rd party browser/server plugin. This plugin differs in capitalization of known keywords, doesn't get comments right, and differs in a lot of other points from the syntax the CS compiler uses.

Only because the browser/server plugin spits out weird colors, doesn't mean there's anything off with the script itself. In fact, ObScript doesn't care for upper- or lowercase typing with most things. "Begin GameMode" is as fine as "begin gamemode" is, and while this browser/server plugin syntax highlighter is acting up, the CS compiler wouldn't care less.

 

You can see this right in the second and third line, where two variables are declared exactly the same way. The first is all lowercase and recognized as a variable, whereas the second is camel case and mistaken for a command in color code.

Both are valid variable names and declarations, it's only the browser/server plugin's syntax highlighting being more strict than the CS compiler.

 

(Not sure if it's still a browser plugin or if it was integrated into the BB code's "code" tag already by now. Nevertheless it doesn't mean anything in regards to real ObScript.)

 

From what I can see the script itself is syntactically correct. It might be the actual coding behind the summon spell, as all summon spells beyond Vanilla's have to be custom implemented, with scripting and all such. Maybe the casting itself is off, as summon spells usually are range "self" spells, but this one gets casted from an activator onto the player/activating entity, instead of onto itself or making the activating entity cast it instead. If you get the debug line informing you of the summoning, the script should be working right.

 

You could swap out this spell with a Vanilla casting spell and would nail the cause down to the spell, if this works. If this spell is using anything from another mod, but the required assets weren't properly 'de-isolated', or the master plugin properly parented, they will go missing after a save of the plugin. You said it's from OBME, so make sure the CS is also started with OBME support for this to begin with.

 

Custom summoning spells are usually implemented via having the creatures to be summoned stored away in a remote holding cell and "moveto"-ing them to the cast location when cast. If they or their holding cell are not in your plugin (or a properly parented master plugin) to begin with, the custom spell implementation itself will fail.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...