My Own Little Mod for Exult.
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Re: My Own Little Mod for Exult.
You can replace the offset arrays with (say) the following:
var offset_X = [0, 1, -1];
var offset_Y = [0, 1, -1];
As for the guard 'patrols'; you could do it with timers... even a single timer would be enough if you use static variables (take a look at how I did the Lock Lake cleanup). The timer would be used to ensure that the required number of hours would have passed for each egg; you could add further checking by use of UI_game_hour to (say) make sure that the current time is a multiple of 3.
var offset_X = [0, 1, -1];
var offset_Y = [0, 1, -1];
As for the guard 'patrols'; you could do it with timers... even a single timer would be enough if you use static variables (take a look at how I did the Lock Lake cleanup). The timer would be used to ensure that the required number of hours would have passed for each egg; you could add further checking by use of UI_game_hour to (say) make sure that the current time is a multiple of 3.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Ok, so the final bit is to make the gargoyles and guards fight, remember this script?
eggBeginCombat 0xd00 ()
{
if (event == 3)
//egg event; call this function again with a time delay.
//Also, use a different event id to differentiate.
script item after 10 ticks call eggBeginCombat, 2;
else if (event == 2) //scripted event
{
const int distance = 30;
const int mask = 4; //NPCs
const int any_shape = -359;
//Get a list with the party members:
var party = UI_get_party_list();
//Find all NPCs at a distance find_nearby
var nearby_npcs = find_nearby(any_shape, distance, mask);
//Loop variables:
var index;
var max;
var npc;
for (npc in nearby_npcs with index to max)
{
if (!(npc in party))
{
//NPC is not in party.
//Get NPC's alignment:
var align = npc->get_alignment();
if (align == 0 || align == 2)
{
//Ignore neutral NPCs.
//Set NPC to attack nearest foe:
npc->set_attack_mode(0);
//Put NPC in 'combat' schedule:
npc->set_schedule_type(0);
}
}
}
}
}
It compiles, it just doesn't seem to work, the gargoyles still barrel right for me, oblivious to the much more threatening guards beside me.
Also, I want to make the guards into usecode eggs for my script, but I need to know how I can attach equipment profiles to them, if thats even possible.
~ Wizardry Dragon
eggBeginCombat 0xd00 ()
{
if (event == 3)
//egg event; call this function again with a time delay.
//Also, use a different event id to differentiate.
script item after 10 ticks call eggBeginCombat, 2;
else if (event == 2) //scripted event
{
const int distance = 30;
const int mask = 4; //NPCs
const int any_shape = -359;
//Get a list with the party members:
var party = UI_get_party_list();
//Find all NPCs at a distance find_nearby
var nearby_npcs = find_nearby(any_shape, distance, mask);
//Loop variables:
var index;
var max;
var npc;
for (npc in nearby_npcs with index to max)
{
if (!(npc in party))
{
//NPC is not in party.
//Get NPC's alignment:
var align = npc->get_alignment();
if (align == 0 || align == 2)
{
//Ignore neutral NPCs.
//Set NPC to attack nearest foe:
npc->set_attack_mode(0);
//Put NPC in 'combat' schedule:
npc->set_schedule_type(0);
}
}
}
}
}
It compiles, it just doesn't seem to work, the gargoyles still barrel right for me, oblivious to the much more threatening guards beside me.
Also, I want to make the guards into usecode eggs for my script, but I need to know how I can attach equipment profiles to them, if thats even possible.
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: My Own Little Mod for Exult.
When the changes I just commited become available, you will be able to use UI_create_new_object2 to create a monster with equipment; right now, you'd have to add the equipment 'manually' (as in, via usecode).
Right, I had forgotten about it. Try replacing the end with this:
//Loop variables:
var index;
var max;
var npc;
var friend_list = [];
var enemy_list = [];
for (npc in nearby_npcs with index to max)
{
if (!(npc in party))
{
//NPC is not in party.
//Get NPC's alignment:
var align = npc->get_alignment();
if (align == 0) || align == 2)
{
//Ignore neutral NPCs.
//Set NPC to attack nearest foe:
npc->set_attack_mode(0);
//Put NPC in 'combat' schedule:
npc->set_schedule_type(0);
if (align == 0)
friend_list = [friend_list, npc];
else
enemy_list = [friend_list, npc];
}
}
}
//How many friendly NPCs are there:
var count = UI_get_array_size(friend_list);
for (npc in enemy_list with index to max)
//Make hostiles attack friendly:
npc->set_opponent(UI_get_random(count));
}
}
Right, I had forgotten about it. Try replacing the end with this:
//Loop variables:
var index;
var max;
var npc;
var friend_list = [];
var enemy_list = [];
for (npc in nearby_npcs with index to max)
{
if (!(npc in party))
{
//NPC is not in party.
//Get NPC's alignment:
var align = npc->get_alignment();
if (align == 0) || align == 2)
{
//Ignore neutral NPCs.
//Set NPC to attack nearest foe:
npc->set_attack_mode(0);
//Put NPC in 'combat' schedule:
npc->set_schedule_type(0);
if (align == 0)
friend_list = [friend_list, npc];
else
enemy_list = [friend_list, npc];
}
}
}
//How many friendly NPCs are there:
var count = UI_get_array_size(friend_list);
for (npc in enemy_list with index to max)
//Make hostiles attack friendly:
npc->set_opponent(UI_get_random(count));
}
}
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Gives a parse error, and I don't see any easy mistakes like forgotten semi-colons.
// this causes guards to fight with gargoyles
eggBeginCombat 0xd00 ()
{
if (event == 3)
//egg event; call this function again with a time delay.
//Also, use a different event id to differentiate.
script item after 10 ticks call eggBeginCombat, 2;
else if (event == 2) //scripted event
{
const int distance = 30;
const int mask = 4; //NPCs
const int any_shape = -359;
//Get a list with the party members:
var party = UI_get_party_list();
//Find all NPCs at a distance find_nearby
var nearby_npcs = find_nearby(any_shape, distance, mask);
//Loop variables:
var index;
var max;
var npc;
var friend_list = [];
var enemy_list = [];
for (npc in nearby_npcs with index to max)
{
if (!(npc in party))
{
//NPC is not in party.
//Get NPC's alignment:
var align = npc->get_alignment();
if (align == 0) || align == 2)
{
//Ignore neutral NPCs.
//Set NPC to attack nearest foe:
npc->set_attack_mode(0);
//Put NPC in 'combat' schedule:
npc->set_schedule_type(0);
if (align == 0)
{
friend_list = [friend_list, npc];
}
}
else
{
enemy_list = [friend_list, npc];
}
}
}
}
}
Gives:
npcs/gargoyles.uc:48: parse error
~ Wizardry Dragon
// this causes guards to fight with gargoyles
eggBeginCombat 0xd00 ()
{
if (event == 3)
//egg event; call this function again with a time delay.
//Also, use a different event id to differentiate.
script item after 10 ticks call eggBeginCombat, 2;
else if (event == 2) //scripted event
{
const int distance = 30;
const int mask = 4; //NPCs
const int any_shape = -359;
//Get a list with the party members:
var party = UI_get_party_list();
//Find all NPCs at a distance find_nearby
var nearby_npcs = find_nearby(any_shape, distance, mask);
//Loop variables:
var index;
var max;
var npc;
var friend_list = [];
var enemy_list = [];
for (npc in nearby_npcs with index to max)
{
if (!(npc in party))
{
//NPC is not in party.
//Get NPC's alignment:
var align = npc->get_alignment();
if (align == 0) || align == 2)
{
//Ignore neutral NPCs.
//Set NPC to attack nearest foe:
npc->set_attack_mode(0);
//Put NPC in 'combat' schedule:
npc->set_schedule_type(0);
if (align == 0)
{
friend_list = [friend_list, npc];
}
}
else
{
enemy_list = [friend_list, npc];
}
}
}
}
}
Gives:
npcs/gargoyles.uc:48: parse error
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: My Own Little Mod for Exult.
The copy/paste introduced quite a few errors
Below the line 'friend_list = [friend_list, npc];', there are two '}'; move one of them below the line 'enemy_list = [friend_list, npc];'
Also, the copy/paste deleted the following lines:
//How many friendly NPCs are there:
var count = UI_get_array_size(friend_list);
for (npc in enemy_list with index to max)
//Make hostiles attack friendly:
npc->set_opponent(UI_get_random(count));
Below the line 'friend_list = [friend_list, npc];', there are two '}'; move one of them below the line 'enemy_list = [friend_list, npc];'
Also, the copy/paste deleted the following lines:
//How many friendly NPCs are there:
var count = UI_get_array_size(friend_list);
for (npc in enemy_list with index to max)
//Make hostiles attack friendly:
npc->set_opponent(UI_get_random(count));
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Could you maybe post the whole script so I don't copy and past very well? xD
As well, I now have a forum here: http://lfs.lfhost.com/tfl_forum/index.php
Maybe you guys (being Marzo and Crysta, as well as anyone else interested) could sign up there and discuss this kind of thing there so we don't hog Exult's forum? ^_~
~ Wizardry Dragon
As well, I now have a forum here: http://lfs.lfhost.com/tfl_forum/index.php
Maybe you guys (being Marzo and Crysta, as well as anyone else interested) could sign up there and discuss this kind of thing there so we don't hog Exult's forum? ^_~
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: My Own Little Mod for Exult.
Sure. I've posted the script in your forum.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Thankee ^_^
I think from now on, this thread can just be used to get some feedback, post screenshots, etc. For us, Marzo and Crysta, just keep an eye on that forum (dont imagine it'll become too active) for anything I might need/the next time I bork my usecode ^_~
(Hey, don't suppose Exult would link me? )
~ Wizardry Dragon
I think from now on, this thread can just be used to get some feedback, post screenshots, etc. For us, Marzo and Crysta, just keep an eye on that forum (dont imagine it'll become too active) for anything I might need/the next time I bork my usecode ^_~
(Hey, don't suppose Exult would link me? )
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: My Own Little Mod for Exult.
It'd be usefull for the exult forum to have subforums for the modding stuff. And a tag to conserve code here.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Re: My Own Little Mod for Exult.
Oh... my... god...
Sir. You have SHOCKED me, and I am DYING to play your mod!
Sir. You have SHOCKED me, and I am DYING to play your mod!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
^__________^
Comments like that are what keeps me going when the going gets tough.
~ Wizardry Dragon
Comments like that are what keeps me going when the going gets tough.
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: My Own Little Mod for Exult.
Wizardry Dragon, what exactly is small in your mod?
_____________
Obsibian Dragon
-==(UDIC)==-
Obsibian Dragon
-==(UDIC)==-
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Spark.
~ Wizardry Dragon
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
So, I'm going to start releasing snapshots, at hopefully a semi-regular interval.
You can find the latest here:
http://www.lfs.lfhost.com/tfl_forum/viewtopic.php?t=15
Hardly complete; hardly started, really, but it gives you a chance to poke around. Right now, changes include a recoded conversation fro Iolo, Dupre, Shamino, and Jaana, and if you teleport to Skeptran and then change to Map 002, you can check out the Feudal Lands, what little Ive done thusfar.
I'll cross-post future snapshots in this thread if the forum mods don't mind, for those interested.
~ Wizardry Dragon
You can find the latest here:
http://www.lfs.lfhost.com/tfl_forum/viewtopic.php?t=15
Hardly complete; hardly started, really, but it gives you a chance to poke around. Right now, changes include a recoded conversation fro Iolo, Dupre, Shamino, and Jaana, and if you teleport to Skeptran and then change to Map 002, you can check out the Feudal Lands, what little Ive done thusfar.
I'll cross-post future snapshots in this thread if the forum mods don't mind, for those interested.
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: My Own Little Mod for Exult.
How could we be against this?I'll cross-post future snapshots in this thread if the forum mods don't mind, for those interested.
Go ahead, Marzo's and your mods are the most interesting things that happen atm with Exult.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Feel free to try the snapshots and post comments/suggestions ^_~
~ Wizardry Dragon
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
-
- Posts: 13
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Back when Exult Studio was still a new thang and things like multi-maps not conceived of yet, I had hoped to do a 'remake' of Ultima4. I've since found I totally lack the time for such a venture, and look forward to seeing the results here.
It may not be what I envisioned, but hey, this looks like it'll be plenty of awesome.
It may not be what I envisioned, but hey, this looks like it'll be plenty of awesome.
-
- Posts: 52
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Cool album Crysta!
Uncle Rico: Napoleon, you know we can't afford the fun pack. What, do you think money grows on trees in this family? Take it back! And get some Pampers for you and your brother while you're at it.
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: My Own Little Mod for Exult.
Octupusfluff - its more of u3 meets u4 meets u5 than a straight u4 remake. It will push the boundaries of Exult's capabilities in a lot of regards ^_^
~ Wizardry Dragon
~ Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca