View Full Version : City of Sins mod
So i tought that i should make topic here about the City of Sins mod im making rather than to that new vegas mods thread cos its about all of new vegas mods not just this one.
Progress update vid 1:
https://www.youtube.com/watch?v=xt_ZeS_dtos
-Entrance quite done.
-Later i will put that entrance npc sell that gate key.
Progress update vid 2:
https://www.youtube.com/watch?v=6mkfxYmRXcw
-First building at City of Sins is now complete
-There is 12 rooms 4 at each floor and all room have work & reloading bench and chemistry set, bed, container, sofa, tv, toilet the basic stuff. All room looks same.
Apartments NPC:
https://www.youtube.com/watch?v=KA85dYvucAw
-Only problem there is that when this mod is used at multiplayer (vaultmp) there isint anyway player find out who has rented what room and how to remove that room from renting list atleast i dont know how to create that.
City of Sins Apartments building Complete:
https://www.youtube.com/watch?v=aWH_bZiw1Ko Watch in Fullscreen
if anyone has any wishes what to put inside the rooms please comment
*Update Apartment building now complete*
CouncilOfDave
08-23-2011, 08:33 PM
Nice work.
You're running into the same wall I hit with the room rental... the best I could think of is using some short script in the end results and conditions on the dialogue lines.
I gave the NPC the keys in their inventory instead of a merchant container, and had an end result script pull the key from the vendor inventory, and add it to the players inventory. I was going to have the room available on the list only on the condition that a specific key was in the vendors inventory, with a "GetItemCount".
I haven't tested it yet, though.
Whether or not that would work with multiplayer, I do not know.
Is the 100 caps for the room permanent, or do you lose the room after a period of time? Ultimately, for a MP server that's what I would prefer to do. Say after a period of a month game time, if you don't pay your rent, you lose your key and your room, etc.
That might be above my head, though.
use this: Result script (begin) player.remove caps001 100 and to Result script (end) player.additem yourkeyname 1 that first takes 100 caps from player and end of chat gives the key and you dont need to put items to vendor inventory and no one can pickpocket their selves a key. And room is permanent you could also make topic that gives key back like: PC: I want to give away my room. NPC: Thank you for visiting. add to NPC reply: Result script (End) player.removeitem yourkeyname 1 and what comes to condition use:
Condition function: GetItemCount
Funtion Parameters: yourkeyname
Comparison: <
Value: 1
Run on: Target
this checks that if you already have that same item, in this case the key for room if you already have one key you cant get more. like i have 12 rooms and own key to all of them and ive added condition after NPC reply "Renting room costs 100 caps. At which floor you want to stay" that if you have any of those room keys you wont see options: 1st Floor, 2nd Floor and 3rd Floor so player has no way to get more keys to rooms.
and to check if player has enough caps to rent room:
Condition Function: GetItemCount
Function Parameters: Caps001
Comparison: >
Value: 100
Run on: Target
because there is Comparison: > you need to have over 100 caps meaning 101 caps to rent room you can also use >= which is greater or equal so you can rent room when you have 100 caps or more but it wont rent you room when you have less caps than 100 just add those to topics what you want to be unaccessable when player doesnt have enough caps or already has the key.
and this is my 4th day using GECK so i dont know about that montly rent thing, to make it happen should make script for it and at that im not good at all. when it comes to harder features to this mod what needs C++ or PAWN their to work properly like in online multiplay house renting when npc checks who has rented what room, i will need scripter to work with me, ive tried so many times learn C++ and PAWN with no success.
Dantiko
08-23-2011, 09:52 PM
Great job you are doing, also make sure the same key won't work for all apartments.
ive tested all keys already that they only work for their own rooms and not to others =)
CouncilOfDave
08-23-2011, 10:49 PM
use this: Result script (begin) player.remove caps001 100 and to Result script (end) player.additem yourkeyname 1 that first takes 100 caps....
and this is my 4th day using GECK so i dont know about that montly rent thing, to make it happen should make script for it and at that im not good at all.
Sorry you typed all that up... hopefully it helps someone else. I know how you did it, and I could have easily done it that way. That works great for single player, but I'm not sure how it would work for MP.
Take this scenario.
Player 1 buys the key to Room 1A. Player 1 now has full access to room 1A, and cannot purchase the same key twice because that key is already in his inventory, and the dialogue option doesn't show up again because GetItemCount shows he has already bought it.
Player 2 shows up an hour later, and tries to buy a room. Player 2 doesn't have the key to room 1A in his inventory - player 1 does - so he gets the dialogue option to buy room 1A, just like player 1 did. He thinks "Sweet, first floor...." and buys the key to room 1A. He doesn't have to be able to pick pocket a key - he can just buy one, like you did. The way you described it, there is no control over key counts. Sure, YOU cannot buy the same key twice... but the vendor can sure sell the same key to multiple people, as long as they have the caps and choose that dialogue option.
Now player 2 has access to all of player 1's room, and all of his gear stashed there.
That is why I didn't set mine up through dialogue, but what I have chosen to do instead is set it up through the barter menu.
I have 12 homes. I have an NPC with a merchant container, and dialogue to open the barter menu.
For each home, there is a unique key that lets the player unlock the door, per usual.
Instead of purchasing the keys through dialogue result scripts, I made 12 misc objects called "Property Deed" (unique for every home). I attached Object scripts to each of these items with an OnAdd function. I went this route instead of the one I posted earlier in the thread, because it seemed like a better idea to let the item that controls availability and key counts not be a key. I might have done it the hard way, who knows.
I set the merchants container not to respawn, and dropped all 12 "Deeds" into it, so that the list of deeds shows up when the barter menu opens. It's out of the cell, not on the merchants person, so the deeds can't be pickpocketed, either.
When player 1 shows up, and asks to see what properties he has for sale, the result script uses the simple ShowBarterMenu function, and the barter window pops up.
All 12 unique deeds are for sale. Player 1 picks the one he wants, pays for it, and the item is added to his inventory. As soon as the Misc. item hits his inventory, it adds the key, a note with a description of his specific house (and acts as the read able version of the deed), and removes the misc item from the players inventory.
When player two shows up, and wants to buy a home, he will only see 11 property deeds for sale... the one that player 1 bought is not available, because the item is gone from the merchants container. This container does not respawn, so once all the homes are sold, no one is buying anything, especially not twice.
I did it this way because I've tried to add keys to merchant containers before, and they don't show up in the barter menu at all.
I would still prefer to figure out how to just rent them, so if Player 1 gets sick of the game, his house doesn't sit unavailable for months on end on the server, with him never to return... if it was rentable, the player would pay say 100 caps a month to maintain ownership, and the property would go back up for rent after say 3 game months of no usage.
That is so much better way to do it than the way i did it! it would work at MP =D but yea when player gets unactive at server and still has the deed for home it should automatically be removed from players inventory when player hasnt paid hes rent and send to vendor container and that needs script to make it happen. And i tried to add keys to container too and had same problem so i made it trough dialogue.
CouncilOfDave
08-23-2011, 11:04 PM
That is so much better way to do it than the way i did it! it would work at MP =D but yea when player gets unactive at server and still has the deed for home it should automatically be removed from players inventory when player hasnt paid hes rent and send to vendor container and that needs script to make it happen.
Yup.
Scripting is NOT my strong suit, at least not the more advanced scripting.
:'(
Pretty sure it would require some sort of timer, which I have never played with.
Dantiko
08-23-2011, 11:09 PM
Remember 1 very important thing, RESTROOMS.
ive made them and too big rooms also xD you could fit 30 toilets to one restroom ive made xD
Yup.
Scripting is NOT my strong suit, at least not the more advanced scripting.
:'(
Pretty sure it would require some sort of timer, which I have never played with.
ye same here scripting never finds place in my head, its impossible me to learn any of it. >.<'
Mazurca
08-24-2011, 12:45 AM
The modding is amazing but my brain cannot comprend how make it.
Perfect mod,good work,really.
i tested that OnAdd script for one key made deed for room as misc item and added OnAdd script to it and it worked great that so much easier and now renting room works at my mod good too =) just the one problem is that still need script for that monthly rent thing QQ
there is one other problem, i tested add player.removeitem yourkeyname 1 to random topic i made so when you rented room and get key once you opened door with key and after that took key off with that topic i made, you still can open rooms door you once opened without the key... need script that makes door check if player has deed and the key if player only has deed door wont open and if player only has key door wont open.
CouncilOfDave
08-24-2011, 04:56 PM
I did notice that the doors remain unlocked even after your key is gone. I haven't looked into that.
I started working on a few test scripts for the rentals, and I'm making some progress. I'm going to hold off on it for a bit until we finish other parts of the mod, but I made some progress.
I guess for now were looking at permanent ownership.
i tried create script with my really bad C++ knowledge that it checks for deed and key using OnActivate and OnOpen but i failed >.<' and yea permanent seems to be only way at the moment until we get the script lol
CouncilOfDave
08-25-2011, 02:49 PM
I'll revisit the rental stuff in a week or so. If I come up with anything I'll toss it your way.
ok im also trying to think something to do with this problem.
savino1234
08-25-2011, 06:09 PM
Does anybody else on the forums have the vast scripting knowledge to help these two fine blokes in their arms race for hotel superiority?
CouncilOfDave
08-25-2011, 09:37 PM
Oh man, we're racing?
Should have brought running shoes...
CouncilOfDave
08-25-2011, 11:27 PM
Folks, race is over. Here ya go, Max...
Make sure that the door has a Reference Editor ID, in this case it is "SmallShackPlayerDoor1".
Then make a new script, and make sure it's an Object script. Make sure you replace the "SmallShackPlayerDoor1" in the script below to whatever the reference editor ID you selected is.
Attach this script to the door:
Scn zLockingDoorsAuto
float doorTimer
Begin GameMode
if doorTimer < 3
set doorTimer to doorTimer + getSecondsPassed
else
SmallShackPlayerDoor1.Lock 255
set doorTimer to 0
endif
end
Begin OnActivate
if SmallShackPlayerDoor1.GetLocked == 0 ; if the door is unlocked
Lock 255
else
Activate
Set doorTimer to 0
endif
End
So you can manually lock the door yourself after you have exited, or wait 3 seconds and it will lock itself...
;D
ETA - I also think I know how to do the rental thing, but it'll take some time to do. The script itself will give me problems, so it'll be mostly trial and error. But, I know how I need to do it. I'll work on that once I get the next round of updates on our mod done...
man thats awesome i didnt even think about automatic lock or locking the door :D great job! :D worked with all 12 doors when tested and again thats great job you did :D now its casino building time =)
CouncilOfDave
08-26-2011, 01:37 PM
Worked on the rental script timers and quest last night for a bit, with small amounts of success. It's at least moving in the right direction, albeit slowly.
savino1234
08-26-2011, 05:36 PM
Also we learned from Houstin the vaultmp programmer that all in game scripts like GECK scripts will need to be converted over to PAWN or C++ scripts which kinda sucks. So it's just something to think about as we make these mods. The scripts I'm not sure about though is whether dialogue will have to be converted over too or not. It would suck if it did.
foxtacles
08-26-2011, 07:17 PM
You don't have to convert your native construction set scripts to PAWN / C++. You can distribute them as a mod to your players ;)
CouncilOfDave
08-26-2011, 07:25 PM
You don't have to convert your native construction set scripts to PAWN / C++. You can distribute them as a mod to your players ;)
Any new items, locations, and references introduced by a mod will still have sync? (once that is done, of course)
foxtacles
08-26-2011, 07:29 PM
Yes ;)
savino1234
08-26-2011, 07:52 PM
Ok, a lot of the technical stuff is hard for me to grasp but hearing good stuff from the man himself is nice. Thanks.
CouncilOfDave
08-26-2011, 09:52 PM
WOOT.
Project is still on. lol
Thanks for the clarification.
Houstin
08-26-2011, 11:39 PM
Unless multiple players will be able to rent the same room, a part of it will have to be serversided. This is what I meant by saying that the saving/loading done clientside would be not be syncronised for other players. Feel free to correct me if I'm wrong, though. If this is possible, then I will work on a Proof of Concept mod that rents all houses, or something else evil that becomes possible because of too many things being client sided.
ye hotel thing need to be at server side otherwise everyone can rent same room as one player rented lol. well im bit busy at the moment myself so i will continue my mod making at next week.
Powered by vBulletin® Version 4.2.1 Copyright © 2023 vBulletin Solutions, Inc. All rights reserved.